Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Combine VLOOKUP and HLOOKUP's capabilities

I have a set of data for which VLOOKUP and HLOOKUP alone will not be
dynamic enough. The MATCH and INDEX function does not get me where I
am going either.

This is a diagram of my raw data set

A B C D
1 Jan 1 Jan 2 Jan 3
2 Acct 1 balance balance balance
3 Acct 2 balance balance balance
4 Acct 3 balance balance balance

The dates will extend very far out to the right as I will add new
information on a weekly basis. There will also be a very large number
of accounts that may get reordered.

I need a formula that will return the balance on a specified day for a
specified account. The reason I need this is that while the raw data
page will be arranged as shown above, my analysis page (the one I will
be pulling the data to) will not be arranged in the same fashion. It
will look like this:

A B C D
1 Acct 1 Acct 2 Acct 3
2 Jan 1 balance balance balance
3 Jan 2 balance balance balance
4 Jan 3 balance balance balance

I would like the formula in cell B2, for instance, to do this: (In
referencing the raw data page) find the cell where Acct 1 and Jan 1
intersect and return the balance to the analysis page.

This analysis sheet will contain possibly more dates and accounts than
the raw data sheet, so there will not be a consistent number of rows/
columns between data when comparing the sheets. This is what blows
the lookups and match out of the water.

VLOOKUP, HLOOKUP, and MATCH require you to keep a rigidly static raw
data structure. For example, if I was to use VLOOKUP and tell the
formula to look over X amount of rows, this would all be fine until I
deleted a bunch of dates in between the reference cell and the data I
want returned.

Thanks for you help.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Combine VLOOKUP and HLOOKUP's capabilities

INDEX([array],MATCH(..),MATCH(...)) will do what you want, where the array is
the table in question, the first MATCH argument is the row you want to match
(account number in your case) and the second MATCH argument is the column you
want to match (date in your case). This returns the intersection (cell
contents) of the row/column match you specify.

Dave


--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"DoooWhat" wrote:

I have a set of data for which VLOOKUP and HLOOKUP alone will not be
dynamic enough. The MATCH and INDEX function does not get me where I
am going either.

This is a diagram of my raw data set

A B C D
1 Jan 1 Jan 2 Jan 3
2 Acct 1 balance balance balance
3 Acct 2 balance balance balance
4 Acct 3 balance balance balance

The dates will extend very far out to the right as I will add new
information on a weekly basis. There will also be a very large number
of accounts that may get reordered.

I need a formula that will return the balance on a specified day for a
specified account. The reason I need this is that while the raw data
page will be arranged as shown above, my analysis page (the one I will
be pulling the data to) will not be arranged in the same fashion. It
will look like this:

A B C D
1 Acct 1 Acct 2 Acct 3
2 Jan 1 balance balance balance
3 Jan 2 balance balance balance
4 Jan 3 balance balance balance

I would like the formula in cell B2, for instance, to do this: (In
referencing the raw data page) find the cell where Acct 1 and Jan 1
intersect and return the balance to the analysis page.

This analysis sheet will contain possibly more dates and accounts than
the raw data sheet, so there will not be a consistent number of rows/
columns between data when comparing the sheets. This is what blows
the lookups and match out of the water.

VLOOKUP, HLOOKUP, and MATCH require you to keep a rigidly static raw
data structure. For example, if I was to use VLOOKUP and tell the
formula to look over X amount of rows, this would all be fine until I
deleted a bunch of dates in between the reference cell and the data I
want returned.

Thanks for you help.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Combine VLOOKUP and HLOOKUP's capabilities

Let me be more specific:
=INDEX(C26:H31,MATCH(D39,B26:B31,0),MATCH(D40,C25: H25,0))

This does what you're looking to do. The index array is C26:H31, the row
match is in B26:B31, based on the value in D39, and the column match is in
C25:H25, based on the value in D40.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Dave F" wrote:

INDEX([array],MATCH(..),MATCH(...)) will do what you want, where the array is
the table in question, the first MATCH argument is the row you want to match
(account number in your case) and the second MATCH argument is the column you
want to match (date in your case). This returns the intersection (cell
contents) of the row/column match you specify.

Dave


--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"DoooWhat" wrote:

I have a set of data for which VLOOKUP and HLOOKUP alone will not be
dynamic enough. The MATCH and INDEX function does not get me where I
am going either.

This is a diagram of my raw data set

A B C D
1 Jan 1 Jan 2 Jan 3
2 Acct 1 balance balance balance
3 Acct 2 balance balance balance
4 Acct 3 balance balance balance

The dates will extend very far out to the right as I will add new
information on a weekly basis. There will also be a very large number
of accounts that may get reordered.

I need a formula that will return the balance on a specified day for a
specified account. The reason I need this is that while the raw data
page will be arranged as shown above, my analysis page (the one I will
be pulling the data to) will not be arranged in the same fashion. It
will look like this:

A B C D
1 Acct 1 Acct 2 Acct 3
2 Jan 1 balance balance balance
3 Jan 2 balance balance balance
4 Jan 3 balance balance balance

I would like the formula in cell B2, for instance, to do this: (In
referencing the raw data page) find the cell where Acct 1 and Jan 1
intersect and return the balance to the analysis page.

This analysis sheet will contain possibly more dates and accounts than
the raw data sheet, so there will not be a consistent number of rows/
columns between data when comparing the sheets. This is what blows
the lookups and match out of the water.

VLOOKUP, HLOOKUP, and MATCH require you to keep a rigidly static raw
data structure. For example, if I was to use VLOOKUP and tell the
formula to look over X amount of rows, this would all be fine until I
deleted a bunch of dates in between the reference cell and the data I
want returned.

Thanks for you help.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Combine VLOOKUP and HLOOKUP's capabilities


Raw Data
A B C D
1 Jan 1 Jan 2 Jan 3
2 Acct 1 balance balance balance
3 Acct 2 balance balance balance
4 Acct 3 balance balance balance

Analysis
A B C D
1 Acct 1 Acct 2 Acct 3
2 Jan 1 balance balance balance
3 Jan 2 balance balance balance
4 Jan 3 balance balance balance

A better description of what I want in cell B2 (on the Analysis page)
is below. This hypothetical "INTERSECTION" formula would behave in
this manner:
INTERSECTION(lookup_value1,table_array1,lookup_val ue2,table_array2)

=INTERSECTION(B$1,'Raw Data'!$A:$A,$A2,'Raw Data'!$1:$1)

The result would give me the value in the cell that lies in the
intersection between these 2. I hope this clears up my intentions.
Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Combine VLOOKUP and HLOOKUP's capabilities

See my response. Your INTERSECTION function is
INDEX([array],MATCH(...),MATCH(...))

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"DoooWhat" wrote:


Raw Data
A B C D
1 Jan 1 Jan 2 Jan 3
2 Acct 1 balance balance balance
3 Acct 2 balance balance balance
4 Acct 3 balance balance balance

Analysis
A B C D
1 Acct 1 Acct 2 Acct 3
2 Jan 1 balance balance balance
3 Jan 2 balance balance balance
4 Jan 3 balance balance balance

A better description of what I want in cell B2 (on the Analysis page)
is below. This hypothetical "INTERSECTION" formula would behave in
this manner:
INTERSECTION(lookup_value1,table_array1,lookup_val ue2,table_array2)

=INTERSECTION(B$1,'Raw Data'!$A:$A,$A2,'Raw Data'!$1:$1)

The result would give me the value in the cell that lies in the
intersection between these 2. I hope this clears up my intentions.
Thanks.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Combine VLOOKUP and HLOOKUP's capabilities

I guess I overlooked the capabilities of the INDEX and MATCH function
used in conjunction. That worked perfectly. Thanks so much for the
great help and quick response!

Kevin

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Combine VLOOKUP and HLOOKUP's capabilities

In B2:

=INDEX($B$2:$Z$50,MATCH("Account id",$A$2:$A$50,0),MATCH("Date",$B$1:$Z$1,0))

Copy across and down: Account ID cell should be of form B$2 and Date of form
$A2


where "Account ID" = Acct1 etc, Date=01/02/2007 etc ... replace with cell
addresses on your report sheet.

All other ranges refer to your "Raw Data" sheet.

HTH


"DoooWhat" wrote:

I have a set of data for which VLOOKUP and HLOOKUP alone will not be
dynamic enough. The MATCH and INDEX function does not get me where I
am going either.

This is a diagram of my raw data set

A B C D
1 Jan 1 Jan 2 Jan 3
2 Acct 1 balance balance balance
3 Acct 2 balance balance balance
4 Acct 3 balance balance balance

The dates will extend very far out to the right as I will add new
information on a weekly basis. There will also be a very large number
of accounts that may get reordered.

I need a formula that will return the balance on a specified day for a
specified account. The reason I need this is that while the raw data
page will be arranged as shown above, my analysis page (the one I will
be pulling the data to) will not be arranged in the same fashion. It
will look like this:

A B C D
1 Acct 1 Acct 2 Acct 3
2 Jan 1 balance balance balance
3 Jan 2 balance balance balance
4 Jan 3 balance balance balance

I would like the formula in cell B2, for instance, to do this: (In
referencing the raw data page) find the cell where Acct 1 and Jan 1
intersect and return the balance to the analysis page.

This analysis sheet will contain possibly more dates and accounts than
the raw data sheet, so there will not be a consistent number of rows/
columns between data when comparing the sheets. This is what blows
the lookups and match out of the water.

VLOOKUP, HLOOKUP, and MATCH require you to keep a rigidly static raw
data structure. For example, if I was to use VLOOKUP and tell the
formula to look over X amount of rows, this would all be fine until I
deleted a bunch of dates in between the reference cell and the data I
want returned.

Thanks for you help.


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Combine VLOOKUP and HLOOKUP's capabilities

Debra Dalgleish shows how to use =index(match()) for this:
http://www.contextures.com/xlFunctions03.html

DoooWhat wrote:

I have a set of data for which VLOOKUP and HLOOKUP alone will not be
dynamic enough. The MATCH and INDEX function does not get me where I
am going either.

This is a diagram of my raw data set

A B C D
1 Jan 1 Jan 2 Jan 3
2 Acct 1 balance balance balance
3 Acct 2 balance balance balance
4 Acct 3 balance balance balance

The dates will extend very far out to the right as I will add new
information on a weekly basis. There will also be a very large number
of accounts that may get reordered.

I need a formula that will return the balance on a specified day for a
specified account. The reason I need this is that while the raw data
page will be arranged as shown above, my analysis page (the one I will
be pulling the data to) will not be arranged in the same fashion. It
will look like this:

A B C D
1 Acct 1 Acct 2 Acct 3
2 Jan 1 balance balance balance
3 Jan 2 balance balance balance
4 Jan 3 balance balance balance

I would like the formula in cell B2, for instance, to do this: (In
referencing the raw data page) find the cell where Acct 1 and Jan 1
intersect and return the balance to the analysis page.

This analysis sheet will contain possibly more dates and accounts than
the raw data sheet, so there will not be a consistent number of rows/
columns between data when comparing the sheets. This is what blows
the lookups and match out of the water.

VLOOKUP, HLOOKUP, and MATCH require you to keep a rigidly static raw
data structure. For example, if I was to use VLOOKUP and tell the
formula to look over X amount of rows, this would all be fine until I
deleted a bunch of dates in between the reference cell and the data I
want returned.

Thanks for you help.


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Combine VLOOKUP and HLOOKUP's capabilities

Thanks to Dave, info helped me greatly in my spreadsheet.

"Dave Peterson" wrote:

Debra Dalgleish shows how to use =index(match()) for this:
http://www.contextures.com/xlFunctions03.html

DoooWhat wrote:

I have a set of data for which VLOOKUP and HLOOKUP alone will not be
dynamic enough. The MATCH and INDEX function does not get me where I
am going either.

This is a diagram of my raw data set

A B C D
1 Jan 1 Jan 2 Jan 3
2 Acct 1 balance balance balance
3 Acct 2 balance balance balance
4 Acct 3 balance balance balance

The dates will extend very far out to the right as I will add new
information on a weekly basis. There will also be a very large number
of accounts that may get reordered.

I need a formula that will return the balance on a specified day for a
specified account. The reason I need this is that while the raw data
page will be arranged as shown above, my analysis page (the one I will
be pulling the data to) will not be arranged in the same fashion. It
will look like this:

A B C D
1 Acct 1 Acct 2 Acct 3
2 Jan 1 balance balance balance
3 Jan 2 balance balance balance
4 Jan 3 balance balance balance

I would like the formula in cell B2, for instance, to do this: (In
referencing the raw data page) find the cell where Acct 1 and Jan 1
intersect and return the balance to the analysis page.

This analysis sheet will contain possibly more dates and accounts than
the raw data sheet, so there will not be a consistent number of rows/
columns between data when comparing the sheets. This is what blows
the lookups and match out of the water.

VLOOKUP, HLOOKUP, and MATCH require you to keep a rigidly static raw
data structure. For example, if I was to use VLOOKUP and tell the
formula to look over X amount of rows, this would all be fine until I
deleted a bunch of dates in between the reference cell and the data I
want returned.

Thanks for you help.


--

Dave Peterson

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Combine VLOOKUP and HLOOKUP's capabilities

You're welcome--I'm sure you meant to thank Debra for her minor contribution
<vbg.

Marcello wrote:

Thanks to Dave, info helped me greatly in my spreadsheet.

"Dave Peterson" wrote:

Debra Dalgleish shows how to use =index(match()) for this:
http://www.contextures.com/xlFunctions03.html

DoooWhat wrote:

I have a set of data for which VLOOKUP and HLOOKUP alone will not be
dynamic enough. The MATCH and INDEX function does not get me where I
am going either.

This is a diagram of my raw data set

A B C D
1 Jan 1 Jan 2 Jan 3
2 Acct 1 balance balance balance
3 Acct 2 balance balance balance
4 Acct 3 balance balance balance

The dates will extend very far out to the right as I will add new
information on a weekly basis. There will also be a very large number
of accounts that may get reordered.

I need a formula that will return the balance on a specified day for a
specified account. The reason I need this is that while the raw data
page will be arranged as shown above, my analysis page (the one I will
be pulling the data to) will not be arranged in the same fashion. It
will look like this:

A B C D
1 Acct 1 Acct 2 Acct 3
2 Jan 1 balance balance balance
3 Jan 2 balance balance balance
4 Jan 3 balance balance balance

I would like the formula in cell B2, for instance, to do this: (In
referencing the raw data page) find the cell where Acct 1 and Jan 1
intersect and return the balance to the analysis page.

This analysis sheet will contain possibly more dates and accounts than
the raw data sheet, so there will not be a consistent number of rows/
columns between data when comparing the sheets. This is what blows
the lookups and match out of the water.

VLOOKUP, HLOOKUP, and MATCH require you to keep a rigidly static raw
data structure. For example, if I was to use VLOOKUP and tell the
formula to look over X amount of rows, this would all be fine until I
deleted a bunch of dates in between the reference cell and the data I
want returned.

Thanks for you help.


--

Dave Peterson


--

Dave Peterson


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
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Possible to combine VLOOKUP and IF(AND) functions? Ihoris Excel Worksheet Functions 1 April 6th 06 09:54 AM
How do I combine If and VLookup function? Felicia Pickett Excel Worksheet Functions 2 December 14th 05 12:06 AM
How to combine a vlookup with a sumif function!!! Mark the Shark Excel Discussion (Misc queries) 2 April 6th 05 11:54 AM
Combine VLOOKUP, IF, AND in one formula Natalie Excel Worksheet Functions 5 April 5th 05 02:32 PM


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