vlookup problem

Cossie

Active Member
Joined
May 6, 2002
Messages
324
I would like to return a value from a vlookup based on the value of A2.

In cell C3 I get the correct result, but i would like cell C4 to say browns plains and C5 to say woodridge. The formula is below. Any ideas anyone. Thanks a million. DC :biggrin:
Book4
ABCD
2logan
3LoganBeenleighBeenleigh
4LoganBrownsPlainsBeenleigh
5LoganWoodridgeBeenleigh
Sheet1
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

venkat1926

Well-known Member
Joined
Aug 21, 2005
Messages
4,824
see this thread

"http://groups.google.com/group/microsoft.public.excel.worksheet.functions/
browse_frm/thread/c41750e2345c7639/ae16ddcb0ec7830f?lnk=st&q=vlookup+all+values+excel&rnum=8#ae16ddcb0ec7830f"
 

macajm

New Member
Joined
Oct 21, 2005
Messages
32
I assume you must really have more data than this dummy set,
but why not simply put c3=if(a3=$A$2,b3,"") and copy down in column C.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
Book5
ABCD
1
2logan3
3LoganBeenleighBeenleigh
4LoganBrowns PlainsBrowns Plains
5LoganWoodridgeWoodridge
6 
Sheet1


C2:

=COUNTIF(A3:A5,A2)

C3:

=IF(ROWS($C$3:C3)<=$C$2,INDEX($B$3:$B$5,SMALL(IF($A$3:$A$5=$A$2,ROW($A$3:$A$5)-ROW($A$3)+1),ROWS($C$3:C3))),"")

which is confirmed with control+shift+enter (not just with enter) then coied down.
 

Forum statistics

Threads
1,141,913
Messages
5,709,306
Members
421,626
Latest member
indigochild

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
Top