Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
carl
 
Posts: n/a
Default Lookup or Match ?

My data comes in like this:

ColA ColB ColC ColD ColD
Line1 !55 200 !202 ABC
Line2 !202 EFG !55 1000

I am trying to fill in a table like this:

!55 !202
Line1 200 ABC
Line2 1000 EFG

So, in this new table, I would like the formula to look at the ColA (eg
"Line1") and ColB (eg "!55") and return the appropriate value from the
original data table.

Is this possible ?

Thank you in advance.


  #2   Report Post  
David Jessop
 
Posts: n/a
Default

Hi,

Suppose your ColA cell is A1 and your two input cells (with 'Line2' and
'!202' in for example) are in A6 and A7.

Then B6 should be

=MATCH(A6,A2:A3,FALSE)

and B7 should be

=MATCH(A7,OFFSET(B1,B6,0,1,4),FALSE)

and the result cell should be

=OFFSET(B1,B6,B7,1,1)

Obviously change the size of the arrays or the length of the range in the
OFFSET function (the 4) as needed.

HTH,

David

"carl" wrote:

My data comes in like this:

ColA ColB ColC ColD ColD
Line1 !55 200 !202 ABC
Line2 !202 EFG !55 1000

I am trying to fill in a table like this:

!55 !202
Line1 200 ABC
Line2 1000 EFG

So, in this new table, I would like the formula to look at the ColA (eg
"Line1") and ColB (eg "!55") and return the appropriate value from the
original data table.

Is this possible ?

Thank you in advance.


  #3   Report Post  
Max
 
Posts: n/a
Default

Another play ..

Assume the source below is in Sheet1, data from row2 down

ColA ColB ColC ColD ColD
Line1 !55 200 !202 ABC
Line2 !202 EFG !55 1000


In Sheet2
--------
Assume this table below is in A1:C3

!55 !202
Line1 ?? ??
Line2 ?? ??


Put in B2:

=OFFSET(Sheet2!$B$1,MATCH($A2,Sheet2!$A:$A,0)-1,MATCH(B$1,Sheet2!$B2:$E2,0))

then copy B2 across to C2, fill down to C3 to populate the grid

This will return the desired results:

!55 !202
Line1 200 ABC
Line2 1000 EFG


--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"carl" wrote in message
...
My data comes in like this:

ColA ColB ColC ColD ColD
Line1 !55 200 !202 ABC
Line2 !202 EFG !55 1000

I am trying to fill in a table like this:

!55 !202
Line1 200 ABC
Line2 1000 EFG

So, in this new table, I would like the formula to look at the ColA (eg
"Line1") and ColB (eg "!55") and return the appropriate value from the
original data table.

Is this possible ?

Thank you in advance.




  #4   Report Post  
Max
 
Posts: n/a
Default

Typos:

Assume the source below is in Sheet1

Sheet1 should read as Sheet2

In Sheet2

should be: In Sheet3

It's also assumed that col A's Line1, Line2 are in identical order in both
sheets
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #5   Report Post  
Max
 
Posts: n/a
Default

It's also assumed that col A's Line1, Line2 are in identical order in both
sheets


If the above is not necessarily true, then try instead in Sheet3:

Put in B2:

=INDEX(OFFSET(Sheet2!$B$1:$E$1,MATCH($A2,Sheet2!$A :$A,0)-1,),MATCH(B$1,OFFSE
T(Sheet2!$B$1:$E$1,MATCH($A2,Sheet2!$A:$A,0)-1,),0)+1)

Copy across and fill down as before
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


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
Lookup & match daniel chen Excel Discussion (Misc queries) 2 June 19th 05 01:18 PM
Complex LookUp / Match Problem ?? carl Excel Worksheet Functions 2 May 2nd 05 08:53 PM
Lookup then Match and insert value from next column Tenacity Excel Worksheet Functions 3 March 4th 05 02:49 AM
lookup, index, match, offset, etc. [email protected] Excel Worksheet Functions 2 January 3rd 05 08:51 PM
Find a match that;s not exact Phyllis Excel Worksheet Functions 0 November 8th 04 08:12 PM


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