Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Lookup on two fields ....if here do this if not do that?

these are hard to explain with out examples..

i want run a lookup from two different columns. if there is a value in
column A i want it to lookup the value for column B. but if the is no value
in column A i want to lookup the value for Column A using the value in column
B. i want to do this without the formula just looping round.

Column A and B are linked in the the lookup spreadsheet.

Hope this enough for someone to help.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Lookup on two fields ....if here do this if not do that?

This is yet another topic that Chip has a complete answer for: see
http://www.cpearson.com/excel/lookups.htm
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"andrewd" wrote in message
...
these are hard to explain with out examples..

i want run a lookup from two different columns. if there is a value in
column A i want it to lookup the value for column B. but if the is no
value
in column A i want to lookup the value for Column A using the value in
column
B. i want to do this without the formula just looping round.

Column A and B are linked in the the lookup spreadsheet.

Hope this enough for someone to help.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Lookup on two fields ....if here do this if not do that?

Hi Bernard,
i don't think the page contains answers to my query.

I want to be able to make a sheet where i can enter either my product code
in column A or the manufacturers code in column B. if the code is entered in
column A i want it to lookup and return the manufacturers code in Column B.
if i enter the manufacturers code in column B i want it to lookup and return
my code it column A. if there isn't a number in either it should do nothing.
The lookup sheet contains a full list of product codes... mycode in column A
and man code in column B

So sheet 1 (master data)
Column A Column B
AAA111 BBB111
ABC111 BCD222
ABH111 BHJ333
AUI111 BYU444


and on sheet 2 we would have

Column A Column B
AAA111
BYU4444
ABH111
BCD222
AUI111

So i want the other column to be filled in by a function of some sort.

Hope this makes sense.

Thanks
Andrew

"Bernard Liengme" wrote:

This is yet another topic that Chip has a complete answer for: see
http://www.cpearson.com/excel/lookups.htm
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"andrewd" wrote in message
...
these are hard to explain with out examples..

i want run a lookup from two different columns. if there is a value in
column A i want it to lookup the value for column B. but if the is no
value
in column A i want to lookup the value for Column A using the value in
column
B. i want to do this without the formula just looping round.

Column A and B are linked in the the lookup spreadsheet.

Hope this enough for someone to help.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Lookup on two fields ....if here do this if not do that?

To lookup the B column, knowing the A value:
=INDEX(Sheet1!$A$1:$B$4,MATCH(A1,Sheet1!$A$1:$A$4, 0),2)
However, a VLOOKUP would be simpler
To lookup the A, knowing the B
=INDEX(Sheet1!$A$1:$B$4,MATCH(B2,Sheet1!$B$1:$B$4, 0),1)

To avoid seen N?A when there is not match, wrap in an IF
=IF(COUNTIF(Sheet1!$A$1:$A$4,A1),INDEX(Sheet1!$A$1 :$B$4,MATCH(A1,Sheet1!$A$1:$A$4,0),2),"")
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"andrewd" wrote in message
...
Hi Bernard,
i don't think the page contains answers to my query.

I want to be able to make a sheet where i can enter either my product code
in column A or the manufacturers code in column B. if the code is entered
in
column A i want it to lookup and return the manufacturers code in Column
B.
if i enter the manufacturers code in column B i want it to lookup and
return
my code it column A. if there isn't a number in either it should do
nothing.
The lookup sheet contains a full list of product codes... mycode in column
A
and man code in column B

So sheet 1 (master data)
Column A Column B
AAA111 BBB111
ABC111 BCD222
ABH111 BHJ333
AUI111 BYU444


and on sheet 2 we would have

Column A Column B
AAA111
BYU4444
ABH111
BCD222
AUI111

So i want the other column to be filled in by a function of some sort.

Hope this makes sense.

Thanks
Andrew

"Bernard Liengme" wrote:

This is yet another topic that Chip has a complete answer for: see
http://www.cpearson.com/excel/lookups.htm
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"andrewd" wrote in message
...
these are hard to explain with out examples..

i want run a lookup from two different columns. if there is a value in
column A i want it to lookup the value for column B. but if the is no
value
in column A i want to lookup the value for Column A using the value in
column
B. i want to do this without the formula just looping round.

Column A and B are linked in the the lookup spreadsheet.

Hope this enough for someone to help.






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
how can I convert data with fields in rows to fields as columns PiyushAg Excel Discussion (Misc queries) 3 July 2nd 07 05:46 AM
Lookup based on two fields without merging? [email protected] Excel Worksheet Functions 5 June 6th 07 08:48 PM
Excel SHOULD NOT AUTO-CHANGE formated text fields to DATE FIELDS! PSSSD Excel Worksheet Functions 2 August 8th 06 09:31 PM
number of fields in the row fields in pivot table UT Excel Discussion (Misc queries) 0 April 13th 06 01:17 AM
Need pie chart with number of fields instead of info in fields Lloyd Pratt Charts and Charting in Excel 1 September 21st 05 11:56 PM


All times are GMT +1. The time now is 04:58 PM.

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

About Us

"It's about Microsoft Excel"