Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Lookup against concatenated source value

Am using this formula in B2 to extract the 2nd and 3rd characters in a
string:

=IF(A2="","",CONCATENATE(MID($A2,2,1),MID($A2,3,1) ))

It correctly displays a "09"

Would like to do a VLOOKUP against the result displayed as "09" (zero
9) and return another value.

How should the table contain the desired matching value?
If I place a 09 in the first column, it's displayed as a 9 and it will
not be found. Changing to TEXT, and pasting as values doesn't work.
If I place "value" before the formula in B2, it will display as a 9,
and increasing the decimal will display as "9.0".

The text string in A1 looks like 609250412-PL.

So how would I configure the first column in the lookup table to
return a value where the source value is the result of a concatenated
formula?

TIA for any ideas.
Pete
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Lookup against concatenated source value

Hi Pete

Firstly I'ld change your IF formula to
=IF(A2="","",MID($A2,2,2))
(can't see why you need to concatenate anything)

Now your question, if I'm understanding it question correctly, you're
having trouble typing 09 in a cell and having it display as 09 rather
than just 9.
Formatting the cells to TEXT and then using Paste Special / Values
(not just paste) should allow you to copy & paste the 09 into the
first column and have it behave.

Hope this helps
JulieD
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Lookup against concatenated source value

On Fri, 3 Feb 2012 14:55:56 -0800 (PST), Pete wrote:

Am using this formula in B2 to extract the 2nd and 3rd characters in a
string:

=IF(A2="","",CONCATENATE(MID($A2,2,1),MID($A2,3,1 )))

It correctly displays a "09"

Would like to do a VLOOKUP against the result displayed as "09" (zero
9) and return another value.

How should the table contain the desired matching value?
If I place a 09 in the first column, it's displayed as a 9 and it will
not be found. Changing to TEXT, and pasting as values doesn't work.
If I place "value" before the formula in B2, it will display as a 9,
and increasing the decimal will display as "9.0".

The text string in A1 looks like 609250412-PL.

So how would I configure the first column in the lookup table to
return a value where the source value is the result of a concatenated
formula?

TIA for any ideas.
Pete


If the first column in the lookup table, and the 2nd and 3rd characters in A2 will always be numbers, then you have several options.

You can enter the values in column 1 of your lookup table as numbers, and convert the formula to a number:
e.g:

=VLOOKUP(IF(A2="","",--MID(A2,2,2)),lookup_table,column_number,FALSE)

If either of those values might be text, then the values in column 1 of the lookup table must also be text. Numbers can be entered as text either by formatting the cell as text BEFORE entering the 09, or by preceding the 09 with a single quote (which wil not show in the cell: '09 )
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Lookup against concatenated source value

Thank you Ron, and JulieD
I took advice from both of your posts, JulieD by removing the
concatenate, and Ron Rosenfeld and JulieD by reconfiguring the lookup
table. It's behaving now. It's nice to have smart people help.

Thank you both.

Pete
On Feb 9, 7:08*am, Ron Rosenfeld wrote:
On Fri, 3 Feb 2012 14:55:56 -0800 (PST), Pete wrote:
Am using this formula in B2 to extract the 2nd and 3rd characters in a
string:


=IF(A2="","",CONCATENATE(MID($A2,2,1),MID($A2,3,1 )))


It correctly displays a "09"


Would like to do a VLOOKUP against the result displayed as "09" (zero
9) and return another value.


How should the table contain the desired matching value?
If I place a 09 in the first column, it's displayed as a 9 and it will
not be found. *Changing to TEXT, and pasting as values doesn't work.
If I place "value" before the formula in B2, it will display as a 9,
and increasing the decimal will display as "9.0".


The text string in A1 looks like 609250412-PL.


So how would I configure the first column in the lookup table to
return a value where the source value is the result of a concatenated
formula?


TIA for any ideas.
Pete


If the first column in the lookup table, and the 2nd and 3rd characters in A2 will always be numbers, then you have several options.

You can enter the values in column 1 of your lookup table as numbers, and convert the formula to a number:
e.g:

=VLOOKUP(IF(A2="","",--MID(A2,2,2)),lookup_table,column_number,FALSE)

If either of those values might be text, then the values in column 1 of the lookup table must also be text. *Numbers can be entered as text either by formatting the cell as text BEFORE entering the *09, *or by preceding the 09 with a single quote (which wil not show in the cell: *'09 *)- Hide quoted text -

- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Lookup against concatenated source value

On Mon, 13 Feb 2012 14:45:50 -0800 (PST), Pete wrote:

Thank you Ron, and JulieD
I took advice from both of your posts, JulieD by removing the
concatenate, and Ron Rosenfeld and JulieD by reconfiguring the lookup
table. It's behaving now. It's nice to have smart people help.

Thank you both.


Glad to help. Thanks for the feedback
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
Changing Source Data using V-lookup Kevin Excel Worksheet Functions 2 April 14th 10 08:14 PM
Source for General V LookUp Tutorial?? ConfusedNHouston Excel Worksheet Functions 3 June 6th 08 12:50 AM
concatenated lookup? BorisS Excel Worksheet Functions 7 December 13th 06 06:57 PM
Lookup for concatenated data Hari Excel Discussion (Misc queries) 2 May 20th 06 05:52 PM
how to lookup one source with alot of table array? Winson Excel Programming 1 January 19th 06 11:13 PM


All times are GMT +1. The time now is 01:55 AM.

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"