VLOOKUP Question

MSchiltz

New Member
Joined
Nov 15, 2012
Messages
8
I am trying to find a formula that recognizes the amount in column F (the amounts under the 00000) and finds it in the same row (different cell). Once it finds it in that row, I would like it to return the number in the same column row 2 (the 800 numbers).

Help?!?!

Possible?!?!

Thanks!

Spend Down ExpensesNetwork
AccountVendorInvoice #P-Card PurchaseInv. Date00000890891895
Mileagea15.9815.98
555700b38.7638.76
c92.3592.35
d262.65262.65
e39.7839.78
f75.9875.98
g36.6236.62
h766.02766.02
i61.161.1
j62.04
k156.06
l335.09
m58.14
n124.44
o125.97
p326.91
q141.27
r188.7
s409.53
t466.94
0

<tbody>
</tbody>
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
This isn't a place where vlookup will do what you want... You want to use a combination of Match() and Index(), as I'm assuming you want to return which of the "800" numbers match the decimal number:

Using your words that the column with 00000 is col F (I'm assuming the header is row 2), the formula would look something like the following (with only the visible portion of what you have):
=index($G$2:$I$2,1,match($F3,$G3:$I3,0))

Hope this helps!
 
Last edited:
Upvote 0
Rather than use a VLOOKUP, I just used a nested IF statement.

In Cell J3

Code:
=IF(F3=G3,G$2,IF(F3=H3,H$2,IF(F3=I3,I$2,"No Match")))

Drag down as necessary. Will return "No Match" if there is not a number in any column.
 
Upvote 0
This isn't a place where vlookup will do what you want... You want to use a combination of Match() and Index(), as I'm assuming you want to return which of the "800" numbers match the decimal number:

Using your words that the column with 00000 is col F (I'm assuming the header is row 2), the formula would look something like the following (with only the visible portion of what you have):
=index($G$2:$I$2,1,match($F3,$G3:$I3,0))

Hope this helps!

This works great, and is probably the better solution. I'm not great with the INDEX and MATCH functions, but it appears to return the same results.
If you are like me, and hate errors in your spreadsheets, you could further it by using
Code:
=IFERROR(INDEX($G$2:$I$2,1,MATCH($F23,$G23:$I23,0)), "xxx")
and replacing xxx with whatever you'd like.
 
Upvote 0
While a nested IF could solve this, I'm assuming there is more to this spreadsheet than what was copied in, and that would get really messy, really quickly using that many IFs! :)
 
Upvote 0
Wow! Learned some cool new tricks! The amount in column F is found in that same row and then pulls the 800 number. What happens if the amount in row F is a summation of two numbers in the same row (with different departments). It will return NA. Is there any way to adjust the formula to create to lines if column F is a summation of two numbers?

Thanks!
 
Upvote 0

Forum statistics

Threads
1,203,524
Messages
6,055,907
Members
444,832
Latest member
bgunnett8

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top