![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 137
|
I want look through excel and find a code such as 3AA00 in a particular column and match that with an account # in a certain row and display that data in the cell that references those.
An example I have is A2: A5 has my code B1: E1 listed account # 100 200 300 400 3AA00 33 6 8 5 3AB00 45 0 8 0 3AE20 5 4 5 5 3AA00 7 5 5 6 Cell G1 look up condition 3AA00 Cell H1 lookup condition 100 I want to match G1 and H1 and display it in a ceratin cell Such has A7 In this case it should display 33 |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
|
Quote:
=OFFSET(A1,MATCH(G1,$A$2:$A$5,0),MATCH(H1,$B$1:$E$1,0)) Method 2 =INDEX(A1:E5,MATCH(G1,A:A,0),MATCH(H1,1:1,0)) Method 3 Use the intersection operator. Aladin |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 137
|
Thanks for you help I have a follow up question if I may...
If lets say Cell H1 the look up condition is 555 something that is not listed in B1:E1 I get a #N/A How do I remove that? I believe with an If statement but I’m having difficulty. I’m using Methdod one. |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
|
Quote:
will return 0 (last one, change it to whatever you wish) when either G1 or H1 or both are not available in the target range of interest. Aladin |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|