Find and manage duplicates in inventory in Excel



Find and manage duplicates in inventory in Excel. Delete or combine inventory items in a list in Excel. Check out my online courses www.easyexcelanswers.com/courses.html
All my courses include online support and a user manual
Let me teach you the VBA that I have learn in my five years of consulting

Let’s take the frustration out of user forms

Become an Affiliate and earn 25% on Course Sales

For more help visit my website www.easyexcelanswers.com or email me at easyexcelanswers@gmail.com.

Contact me regarding customizing this template for your needs.

Click for online Excel Consulting

I am able to provide online help on your computer at a reasonable rate.

I use a Blue condenser Microphone to record my videos, here is the link

Check out Crowdcast for creating your webinars

If you need to buy Office 2019 follow

I use Tube Buddy to help promote my videos
Check them out

Follow me on Facebook

TWEET THIS VIDEO

Follow me on twitter
easyexcelanswers

IG @barbhendersonconsulting

You can help and generate a translation to you own language

*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.
code
Private Sub CommandButton1_Click()
Dim partnum As String
partnum = Me.TextBox1.Text
Dim LR As Long
Dim r As Long
Dim i As Long
ListBox1.Clear
With ActiveSheet
LR = .Range(“A” & .Rows.Count).End(xlUp).Row
For r = 2 To LR
If ActiveSheet.Cells(r, 1).Value = Val(TextBox1.Value) Then
ListBox1.AddItem .Cells(r, 4).Value ‘Man
ListBox1.List(i, 2) = .Cells(r, 5).Value ‘qty on hand
ListBox1.List(i, 3) = .Cells(r, 7).Value ‘cost
ListBox1.List(i, 4) = .Cells(r, 8).Value ‘total value
ListBox1.List(i, 5) = .Cells(r, 10).Value ‘avg cost

i = i + 1
End If
Next r
End With
End Sub

Private Sub CommandButton2_Click()
Dim selectrow As String
If Me.TextBox1.Text = “” Then
MsgBox “Please Select a record”
Exit Sub
End If

Dim Rng As Range
Dim rownumber As Long
selectrow = Me.TextBox2.Value
Set Rng = ActiveSheet.Columns(“D:D”).Find(What:=selectrow, _
LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
rownumber = Rng.Row
ActiveSheet.Cells(rownumber, 4) = Me.TextBox2.Value ‘1a
ActiveSheet.Cells(rownumber, 5) = Me.TextBox3.Text ‘qty on hand
ActiveSheet.Cells(rownumber, 8) = Me.TextBox5.Text ‘total value
ActiveSheet.Cells(rownumber, 10) = Me.TextBox6.Text ‘average cost

Me.TextBox2.Text = “”
Me.TextBox3.Text = “”
Me.TextBox4.Text = “”
Me.TextBox5.Text = “”
Me.TextBox6.Text = “”

Call refresh_data

End Sub

Private Sub CommandButton3_Click()
If Me.TextBox2.Value = “” Then
MsgBox “Please Select a record”
Exit Sub
End If

Dim selectrow As String
Dim Rng As Range
Dim rownumber As Long
selectrow = Me.TextBox2.Value
Set Rng = ActiveSheet.Columns(“D:D”).Find(What:=selectrow, _
LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
rownumber = Rng.Row
ActiveSheet.Cells(rownumber, 1).Select
ActiveCell.EntireRow.Delete Shift:=xlUp
Me.TextBox2.Text = “”
Me.TextBox3.Text = “”
Me.TextBox4.Text = “”
Me.TextBox5.Text = “”
Me.TextBox6.Text = “”
Call refresh_data
End Sub
Private Sub CommandButton4_Click()
Dim ctl As Control ‘ Removed MSForms.

For Each ctl In Me.Controls
Select Case TypeName(ctl)
Case “TextBox”
ctl.Value = “”
Case “ListBox”
ctl.ListIndex = -1

End Select
Next ctl
ListBox1.Clear

End Sub

Watch more new videos about Excel Office | Synthesized by Mindovermetal English

5/5 - (1 bình chọn)

Bài viết liên quan

Theo dõi
Thông báo của
guest
0 Comments
Phản hồi nội tuyến
Xem tất cả bình luận