Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tenacity
 
Posts: n/a
Default Lookup then Match and insert value from next column

How can I automate this? Please note I'm not too good with macros, if that's
what's required, but I like to try.

I have a list of countries in column 1 with corresponding values in column
2. I have a second spreadsheet with the same countries (usually spelled the
same way) in column 1 and a new set of values in column 2.

how can I have the countries in col 1 of ss 2 looked up and matched with the
countries in col 1 of ss 1 and insert the value from col 2 of ss 2 into col 3
of ss 1.

For example:

SS1 cols 1,2:

Afghanistan $50,000

SS2 cols 1,2:

Afghanistan $100,000

I would like to automatically have SS1 result in the following in cols. 1,2,3:

Afghanistan $50,000 $100,000


I can't find a function or set of functions which does this.

VLOOKUP and HLOOKUP do not seem to work, since I want to lookup on ss2 and
Match to the same value on ss1. Likewise, MATCH does not seem to work since
that Matches fine, but does not return a value in same row as the item
matched.

any countries where the spelling is slightly different would be marked in
red or otherwise indicated that a match was not possible (probably the
indication would be on ss 2 since that is where the failed matched country
originated from). or is there a way that if the spelling is, for example,
Afghanestan, function will find closest match and return the value in the
column next to closest match?

hopefully, some or all of the above is possible and can be automated. it's
fine if it's a combination of 2 or more functions or a macro. appreciate
your help. thanks
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Use 2 vlookup, one for each sheet but with the same lookup value and put
them next to each other

--

Regards,

Peo Sjoblom


"Tenacity" wrote in message
...
How can I automate this? Please note I'm not too good with macros, if

that's
what's required, but I like to try.

I have a list of countries in column 1 with corresponding values in column
2. I have a second spreadsheet with the same countries (usually spelled

the
same way) in column 1 and a new set of values in column 2.

how can I have the countries in col 1 of ss 2 looked up and matched with

the
countries in col 1 of ss 1 and insert the value from col 2 of ss 2 into

col 3
of ss 1.

For example:

SS1 cols 1,2:

Afghanistan $50,000

SS2 cols 1,2:

Afghanistan $100,000

I would like to automatically have SS1 result in the following in cols.

1,2,3:

Afghanistan $50,000 $100,000


I can't find a function or set of functions which does this.

VLOOKUP and HLOOKUP do not seem to work, since I want to lookup on ss2 and
Match to the same value on ss1. Likewise, MATCH does not seem to work

since
that Matches fine, but does not return a value in same row as the item
matched.

any countries where the spelling is slightly different would be marked in
red or otherwise indicated that a match was not possible (probably the
indication would be on ss 2 since that is where the failed matched country
originated from). or is there a way that if the spelling is, for example,
Afghanestan, function will find closest match and return the value in the
column next to closest match?

hopefully, some or all of the above is possible and can be automated.

it's
fine if it's a combination of 2 or more functions or a macro. appreciate
your help. thanks



  #3   Report Post  
RagDyer
 
Posts: n/a
Default

I don't know why you think that Vlookup doesn't fit this situation.

Try this in Column C of Sheet1:

=IF(ISNA(MATCH(A1,Sheet2!$A$1:$A$100,0)),"Not
Found",VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0))

This will need an *exact* spelling match in both datalists,
or you'll get the "Not Found" message, which might direct you to where you
can correct the spelling.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"Tenacity" wrote in message
...
How can I automate this? Please note I'm not too good with macros, if
that's
what's required, but I like to try.

I have a list of countries in column 1 with corresponding values in column
2. I have a second spreadsheet with the same countries (usually spelled the
same way) in column 1 and a new set of values in column 2.

how can I have the countries in col 1 of ss 2 looked up and matched with the
countries in col 1 of ss 1 and insert the value from col 2 of ss 2 into col
3
of ss 1.

For example:

SS1 cols 1,2:

Afghanistan $50,000

SS2 cols 1,2:

Afghanistan $100,000

I would like to automatically have SS1 result in the following in cols.
1,2,3:

Afghanistan $50,000 $100,000


I can't find a function or set of functions which does this.

VLOOKUP and HLOOKUP do not seem to work, since I want to lookup on ss2 and
Match to the same value on ss1. Likewise, MATCH does not seem to work since
that Matches fine, but does not return a value in same row as the item
matched.

any countries where the spelling is slightly different would be marked in
red or otherwise indicated that a match was not possible (probably the
indication would be on ss 2 since that is where the failed matched country
originated from). or is there a way that if the spelling is, for example,
Afghanestan, function will find closest match and return the value in the
column next to closest match?

hopefully, some or all of the above is possible and can be automated. it's
fine if it's a combination of 2 or more functions or a macro. appreciate
your help. thanks

  #4   Report Post  
Tenacity
 
Posts: n/a
Default

Thank you RagDyer, this worked.

Pls. see my post under Excel-Programming asking about automating the
conforming of cell contents.

Automating conform of cell contents so they MATCH

Thanks again.

"RagDyer" wrote:

I don't know why you think that Vlookup doesn't fit this situation.

Try this in Column C of Sheet1:

=IF(ISNA(MATCH(A1,Sheet2!$A$1:$A$100,0)),"Not
Found",VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0))

This will need an *exact* spelling match in both datalists,
or you'll get the "Not Found" message, which might direct you to where you
can correct the spelling.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"Tenacity" wrote in message
...
How can I automate this? Please note I'm not too good with macros, if
that's
what's required, but I like to try.

I have a list of countries in column 1 with corresponding values in column
2. I have a second spreadsheet with the same countries (usually spelled the
same way) in column 1 and a new set of values in column 2.

how can I have the countries in col 1 of ss 2 looked up and matched with the
countries in col 1 of ss 1 and insert the value from col 2 of ss 2 into col
3
of ss 1.

For example:

SS1 cols 1,2:

Afghanistan $50,000

SS2 cols 1,2:

Afghanistan $100,000

I would like to automatically have SS1 result in the following in cols.
1,2,3:

Afghanistan $50,000 $100,000


I can't find a function or set of functions which does this.

VLOOKUP and HLOOKUP do not seem to work, since I want to lookup on ss2 and
Match to the same value on ss1. Likewise, MATCH does not seem to work since
that Matches fine, but does not return a value in same row as the item
matched.

any countries where the spelling is slightly different would be marked in
red or otherwise indicated that a match was not possible (probably the
indication would be on ss 2 since that is where the failed matched country
originated from). or is there a way that if the spelling is, for example,
Afghanestan, function will find closest match and return the value in the
column next to closest match?

hopefully, some or all of the above is possible and can be automated. it's
fine if it's a combination of 2 or more functions or a macro. appreciate
your help. thanks



"RagDyer" wrote:

I don't know why you think that Vlookup doesn't fit this situation.

Try this in Column C of Sheet1:

=IF(ISNA(MATCH(A1,Sheet2!$A$1:$A$100,0)),"Not
Found",VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0))

This will need an *exact* spelling match in both datalists,
or you'll get the "Not Found" message, which might direct you to where you
can correct the spelling.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"Tenacity" wrote in message
...
How can I automate this? Please note I'm not too good with macros, if
that's
what's required, but I like to try.

I have a list of countries in column 1 with corresponding values in column
2. I have a second spreadsheet with the same countries (usually spelled the
same way) in column 1 and a new set of values in column 2.

how can I have the countries in col 1 of ss 2 looked up and matched with the
countries in col 1 of ss 1 and insert the value from col 2 of ss 2 into col
3
of ss 1.

For example:

SS1 cols 1,2:

Afghanistan $50,000

SS2 cols 1,2:

Afghanistan $100,000

I would like to automatically have SS1 result in the following in cols.
1,2,3:

Afghanistan $50,000 $100,000


I can't find a function or set of functions which does this.

VLOOKUP and HLOOKUP do not seem to work, since I want to lookup on ss2 and
Match to the same value on ss1. Likewise, MATCH does not seem to work since
that Matches fine, but does not return a value in same row as the item
matched.

any countries where the spelling is slightly different would be marked in
red or otherwise indicated that a match was not possible (probably the
indication would be on ss 2 since that is where the failed matched country
originated from). or is there a way that if the spelling is, for example,
Afghanestan, function will find closest match and return the value in the
column next to closest match?

hopefully, some or all of the above is possible and can be automated. it's
fine if it's a combination of 2 or more functions or a macro. appreciate
your help. thanks


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
Look up then insert value in next column Tenacity Excel Worksheet Functions 2 February 18th 05 10:53 PM
lookup frapey Excel Worksheet Functions 1 February 16th 05 11:26 AM


All times are GMT +1. The time now is 03:12 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"