Link to home
Create AccountLog in
Avatar of upobDaPlaya
upobDaPlaya

asked on

In VBA how do I store a lookup value in an array, then loop thru the array

Attached I have a 3 tab spreadsheet: Source, Today, and Not Matched
1.In VBA I would like to compare the Today tab with the Source tab based on fields "Amt" "Store" and "Date"
2.If I find a match I would like to store the "ID" value from the source tab for the first match found (note there could be multiple matches)
3.I would then like to re-loop thru the Source tab to find any ID's that are not found in the stored value from above
4.The final step would be I would write out the missing ID's to a tab called "Not Matched"

I am familiar with looping, but I do not know the approach or syntax to create an array for the id and to store the array....
ee-Not-Matched.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of upobDaPlaya
upobDaPlaya

ASKER

This is great !  Can you explain what the scripting library does ?
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks for the solution and the Dictionary link...very helpful
You're welcome.