IJ_Alducente
New Member
- Joined
- Jan 12, 2017
- Messages
- 3
Please help me...
Here's what I'm working on right now.
Sheet #1 has:
Company Code, Account Number, and Customer Name
Sheet #2 has:
Company Code, Account Number, and Customer Name
Both sheets have the same data except that in Sheet #1 under the Company Code column the cells show "ABC", "DEF", "GHI"
Sheet #2 is where my Table array is and under the Company Code column of Sheet #2 it says "ABC-1", "ABC-2", "DEF", "GHI"
I want to change "ABC" in Sheet #1 to either "ABC-1" or "ABC-2" depending on the value in the cells under the column Account number using the Vlookup function.
Note: The values under the column Account number in Sheet #1 is my Lookup Value
My problem is:
When I do a Vlookup in VBA, the Vlookup function has to be in a specific cell only and the problem with that is that the number of rows I occupy in Sheet #1 varies in a daily basis.
How do I do a Vlookup using VBA only for the cells in Sheet #1 where the Company Code only says "ABC"?
Here's what I'm working on right now.
Sheet #1 has:
Company Code, Account Number, and Customer Name
Sheet #2 has:
Company Code, Account Number, and Customer Name
Both sheets have the same data except that in Sheet #1 under the Company Code column the cells show "ABC", "DEF", "GHI"
Sheet #2 is where my Table array is and under the Company Code column of Sheet #2 it says "ABC-1", "ABC-2", "DEF", "GHI"
I want to change "ABC" in Sheet #1 to either "ABC-1" or "ABC-2" depending on the value in the cells under the column Account number using the Vlookup function.
Note: The values under the column Account number in Sheet #1 is my Lookup Value
My problem is:
When I do a Vlookup in VBA, the Vlookup function has to be in a specific cell only and the problem with that is that the number of rows I occupy in Sheet #1 varies in a daily basis.
How do I do a Vlookup using VBA only for the cells in Sheet #1 where the Company Code only says "ABC"?