Info transfer based on entered value

Closed
greg - Mar 5, 2011 at 07:13 PM
aspperasp Posts 6 Registration date Sunday November 11, 2012 Status Member Last seen December 16, 2012 - Nov 11, 2012 at 08:56 PM
Hello,

I have data in n excel database called inventory. The first column of data represents a unique box number. I need to enter a box number, do a search and transfer all the info associated with that row to another spreadsheet called complete and remove it for the database called inventory. This process will be repeated until all info for all boxes have been transfered to a new spreadsheet.



2 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Mar 5, 2011 at 11:05 PM
quote
I need to enter a box number
unquote
do you mean to say you want to have input box pop up so that you can type the unique box number

as you are deleting rows from inventory keep copy of original data in sheet 3 safely

I also suppose that unique box nuimber is in column A
try this macro

Sub test()
Dim j As Long, cfind As Range
Worksheets("inventory").Activate
j = InputBox("type the unique box number")
Set cfind = Columns("A:A").Cells.Find(What:=j, LookAt:=xlWhole)
If Not cfind Is Nothing Then
cfind.EntireRow.Copy Worksheets("complete").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
cfind.EntireRow.Delete
Else
MsgBox "that nummber is not available in the sheet invenetory"
End If
End Sub
0
Thank you so much for your help.
Yes, I want to have input box pop up so that I can type the unique box number.
0
The scanned or typed in bar code number will be input in the pop up box and compared to to a series of numbers located in column A7:A612. Columns B,C,and D have information on the product in each box that I need to transfer to another file one the box bar code has been entered. Not sure how to created the the pop up? My knowledge of Macros is extremely limited.
Thank you again for your assistance.
0
Tried the macro. This Message appeared when I entered the number 00002213370000928557 which is in column A on the inventory sheet:

Time error 6
overflow
j = InputBox("type the unique box number") is highlighted
0
I believe my approach was inadequate do to my limited knowledge of macros. What i am doing is receiving boxes with different product and amounts of product. Each box is bar coded. I was sent an excel spreadsheet with the barcode numbers and associated info,(amounts and type of product. Column A is Case Number, Column B Ship Date, Column C Item, Column D Inventory Qty. I would like to scan the boxes when they arrive find the barcode in the data and view the type and quantity of product to compared to the received Box with product Then time/date each box received as it is scanned. I don't need to delete any info, I was doing that because of my conditional true/false approach. I have a little less than 700 rows of boxes with unique numbers. sorry for all the messages but I realize you know macros well and you may have a better approach.
0
aspperasp Posts 6 Registration date Sunday November 11, 2012 Status Member Last seen December 16, 2012
Nov 11, 2012 at 08:56 PM
This helps me a lot
0