Hi all,
First time using this forum, or any for that matter.
Apologies if I am doing this wrong or if this is in the wrong section, please advise if so and I can change.
Basically I have a ever expanding list of part numbers in in Column A, and I want to return a location code or likely many location codes in Column S.
I have compiled a list in my macro BaseDoc (macro enabled file which I run in the background to execute various macros on each delivery order).
So what I am looking for help with is creating a macro to scan the all populated cells in column A for code eg(1545214587) and if it is present to input (L1R6|L3R9|L2R1) into the corresponding cell in column S.
I have got it to work but only if I scan each cell in column A manually below is the code I used for that, however I now realize (after 2 weeks) that this will take many many lifetimes to input the same search for each cell in column A and then repeat over for the roughly 4000 part numbers one by one.
Below is an example of what I have been using. Can I loop this easily for any populated cells in column A?
Sub Part_Number_And_Location_Lookup()
If Range("A2").Value = 1545214587 Then Range("S2").Value = "L1R6|L3R9|L2R1"
End Sub
Any ideas on how I can test each cell in the column for the part number and return the value if it is present and just ignore it if not?
Or am I going about this task in completely the wrong way and is there a better way?
Thanks in advance
Brian.
Bookmarks