Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default simplify VLOOKUP with conditions

I wrote this funciton as a quick fix for a collegue.
It looks for a comma in the cell.
No comma = standard VLOOKUP
Comma = concatenate 2 VLOOKUPs
I would like to make the formula flexible enough to handle more than 1 comma
and to handle situations when there is a slash instead of a comma.

=IF(ISERROR(FIND(",",C4,1)),VLOOKUP(C4,Cat!$A$2:$B $129,2,FALSE),VLOOKUP(LEFT(C4,(FIND(",",C4,1)-1)),Cat!$A$2:$B$129,2,FALSE)&",
"&VLOOKUP(MID(C4,FIND(",",C4,1)+1,255),Cat!$A$2:$B $129,2,FALSE))

--
tj
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default simplify VLOOKUP with conditions

If you posted some sample data it would help!

Biff

"tjtjjtjt" wrote in message
...
I wrote this funciton as a quick fix for a collegue.
It looks for a comma in the cell.
No comma = standard VLOOKUP
Comma = concatenate 2 VLOOKUPs
I would like to make the formula flexible enough to handle more than 1
comma
and to handle situations when there is a slash instead of a comma.

=IF(ISERROR(FIND(",",C4,1)),VLOOKUP(C4,Cat!$A$2:$B $129,2,FALSE),VLOOKUP(LEFT(C4,(FIND(",",C4,1)-1)),Cat!$A$2:$B$129,2,FALSE)&",
"&VLOOKUP(MID(C4,FIND(",",C4,1)+1,255),Cat!$A$2:$B $129,2,FALSE))

--
tj



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookup a Vlookup adamb2000 Excel Worksheet Functions 4 June 28th 06 10:54 PM
Lookup Data in two seperate Spreadsheets Padraig Excel Worksheet Functions 6 June 28th 06 03:05 PM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
Vlookup Jai Excel Discussion (Misc queries) 2 July 26th 05 09:48 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM


All times are GMT +1. The time now is 01:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"