Forum Discussion
shockliz
Feb 14, 2022Copper Contributor
Formula help pls- im stuck
Worksheet #1 has a "Last Name" and a "Dollar amount". Worksheet #2 has a "Last Name" and a "US State". I'm trying to create a formula to move the State from sheet 2 to sheet 1: If a last name in she...
- Feb 14, 2022
I believe you are looking for a lookup function (xlookup, index/match, vlookup). Not knowing what version of excel you're using or how the data is laid out, I'll suggest index/match.
If this is worksheet #2:
And this is worksheet #1
Then, as you can see, the formula would be:
=INDEX(Sheet2!$B$2:$B$4,MATCH(A2,Sheet2!$A$2:$A$4,0))
Adjust cell/range references as needed.
JMB17
Feb 14, 2022Bronze Contributor
I believe you are looking for a lookup function (xlookup, index/match, vlookup). Not knowing what version of excel you're using or how the data is laid out, I'll suggest index/match.
If this is worksheet #2:
And this is worksheet #1
Then, as you can see, the formula would be:
=INDEX(Sheet2!$B$2:$B$4,MATCH(A2,Sheet2!$A$2:$A$4,0))
Adjust cell/range references as needed.
shockliz
Feb 14, 2022Copper Contributor
This worked like a charm. Thank you very much.