VLookup to return the last value of a row based on criteria

tarek

New Member
Joined
Nov 21, 2006
Messages
24
Hi,

I've been researching below issue for couple of days with out any luck of a solution:

I am trying to create a formula which return the last value in a row based on a client name example:

Column A (client name).......Column B (Data1).......Column C (Data2).............Column D (Data3).......
ClientA....................................6...............................2.......................................4....................
ClientB.................................................................... 3
ClientC..............................................................................................................5...................
ClientD
ClientE


Formula should return:
ClientA: 4
ClientB: 3
ClientD: 5
and so on...

Please note: in my case I may have 26 columns of data (Hence: this is why I couldn't use a nested if). I tried leveraging =INDEX(Range,MATCH(9.99999999999999E+307,Range)) but it that didn't work as the results is depended on the client name users pick from a drop down.

Any help on this is much appreciated!

Tarek
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
=LOOKUP(9.99E+307,A2:Z2) will give you the right most numeric value in a range.
 
Upvote 0
Maybe something like this


A
B
C
D
1
Client​
Data1​
Data2​
Data3​
2
ClientA​
6​
2​
4​
3
ClientB​
3​
4
ClientC​
5​
5
ClientD​
1​
4​
6
ClientE​
3​
7​
7
8
9
ClientA​
4​
10
ClientB​
3​
11
ClientC​
5​
12
ClientD​
4​
13
ClientE​
7​
14

Formula in B9 copied down
=LOOKUP(9.99E+307,INDEX($B$2:$D$6,MATCH(A9,$A$2:$A$6,0),0))

Hope this helps

M.
 
Upvote 0
Thank you Anglais and Marcelo for your time and prompt response. We are on the right track, and apologies if I didn't translate my thoughts accurately. Looking at Marcelo's table, the scenario that I have is let us say that I only have a drop down list of clients name in cell A10, how can I have the formula reference A10 and bring the correct data based on user client selection from the list?

Thanks again for all the help on this.
 
Upvote 0
Thank you Anglais and Marcelo for your time and prompt response. We are on the right track, and apologies if I didn't translate my thoughts accurately. Looking at Marcelo's table, the scenario that I have is let us say that I only have a drop down list of clients name in cell A10, how can I have the formula reference A10 and bring the correct data based on user client selection from the list?

Thanks again for all the help on this.

Try

=LOOKUP(9.99E+307,INDEX($B$2:$D$6,MATCH(A10,$A$2:$A$6,0),0))

M.
 
Upvote 0
Great Info, but does someone know how you could do the same thing but with text instead of numbers?

Much appreciated
 
Upvote 0
Great Info, but does someone know how you could do the same thing but with text instead of numbers?

Much appreciated

Welcome to Mr Excel

Try this
=LOOKUP(REPT("z",255),INDEX($B$2:$D$6,MATCH(A9,$A$2:$A$6,0),0))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

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