Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Help with HLOOKUP/INDEX/MATCH

Hi

I have a worksheet where the user enters the month they are interested in
the data for from a drop-down box A2. I then had a HLOOKUP to find the value
from the column for that month. This worked fine. The problem is, each month
is now going to have 2 columns under it (one for this year & one for last
year) and from what I've read HLOOKUP may no longer be the right solution and
perhaps INDEX &/or MATCH would be better but I'm struggling with the how the
formula would read.

The spreadsheet now looks like this below, with month names in row 1 being
centred across each pair of year columns in row 2. My formula goes in row 3
under the Export column. When the user selects, say January in cell A2, then
in row 3 under Export 2008 it should read 55. If they changed the month to
February, the formula should return 72.


Month January February Export
January 2008 2007 2008 2007 2008 2007
55 111 72 19


Any help with this would be very much appreciated!

Thanks
Martyn

Excel 2000, Windows Server 2003 over Citrix PS4

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default Help with HLOOKUP/INDEX/MATCH

Try using offset and match

For instance under Export and 2008 put the formula

=Offset(A1,2,Match(A2,B1:X1,0))

Then for the 2007 just add a simple + 1 to the match like

=Offset(A1,2,Match(A2,B1:X1,0)+1)

"WembleyBear" wrote:

Hi

I have a worksheet where the user enters the month they are interested in
the data for from a drop-down box A2. I then had a HLOOKUP to find the value
from the column for that month. This worked fine. The problem is, each month
is now going to have 2 columns under it (one for this year & one for last
year) and from what I've read HLOOKUP may no longer be the right solution and
perhaps INDEX &/or MATCH would be better but I'm struggling with the how the
formula would read.

The spreadsheet now looks like this below, with month names in row 1 being
centred across each pair of year columns in row 2. My formula goes in row 3
under the Export column. When the user selects, say January in cell A2, then
in row 3 under Export 2008 it should read 55. If they changed the month to
February, the formula should return 72.


Month January February Export
January 2008 2007 2008 2007 2008 2007
55 111 72 19


Any help with this would be very much appreciated!

Thanks
Martyn

Excel 2000, Windows Server 2003 over Citrix PS4

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help with HLOOKUP/INDEX/MATCH

month names in row 1 being centred across
each pair of year columns in row 2.


The month name will be referenced from the leftmost cell and HLOOKUP will
find the leftmost instance so HLOOKUP should still work.

Did you try it and it didn't work?

--
Biff
Microsoft Excel MVP


"WembleyBear" wrote in message
...
Hi

I have a worksheet where the user enters the month they are interested in
the data for from a drop-down box A2. I then had a HLOOKUP to find the
value
from the column for that month. This worked fine. The problem is, each
month
is now going to have 2 columns under it (one for this year & one for last
year) and from what I've read HLOOKUP may no longer be the right solution
and
perhaps INDEX &/or MATCH would be better but I'm struggling with the how
the
formula would read.

The spreadsheet now looks like this below, with month names in row 1 being
centred across each pair of year columns in row 2. My formula goes in row
3
under the Export column. When the user selects, say January in cell A2,
then
in row 3 under Export 2008 it should read 55. If they changed the month to
February, the formula should return 72.


Month January February Export
January 2008 2007 2008 2007 2008 2007
55 111 72 19


Any help with this would be very much appreciated!

Thanks
Martyn

Excel 2000, Windows Server 2003 over Citrix PS4



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Help with HLOOKUP/INDEX/MATCH

Hi

Yes, it does work when using HLOOKUP but because my month heading is merged
over the two year columns the result is as you say, just the leftmost
column. This is fine for 2008 column but I also need to bring the value from
the 2007 column as well into the corresponding Export column, and that's
where I'm stuck with HLOOKUP and thought INDEX and MATCH might be the answer
though I've not used them before.

Martyn




"T. Valko" wrote in message
...
month names in row 1 being centred across
each pair of year columns in row 2.


The month name will be referenced from the leftmost cell and HLOOKUP will
find the leftmost instance so HLOOKUP should still work.

Did you try it and it didn't work?

--
Biff
Microsoft Excel MVP


"WembleyBear" wrote in message
...
Hi

I have a worksheet where the user enters the month they are interested in
the data for from a drop-down box A2. I then had a HLOOKUP to find the
value
from the column for that month. This worked fine. The problem is, each
month
is now going to have 2 columns under it (one for this year & one for last
year) and from what I've read HLOOKUP may no longer be the right solution
and
perhaps INDEX &/or MATCH would be better but I'm struggling with the how
the
formula would read.

The spreadsheet now looks like this below, with month names in row 1
being
centred across each pair of year columns in row 2. My formula goes in row
3
under the Export column. When the user selects, say January in cell A2,
then
in row 3 under Export 2008 it should read 55. If they changed the month
to
February, the formula should return 72.


Month January February Export
January 2008 2007 2008 2007 2008 2007
55 111 72 19


Any help with this would be very much appreciated!

Thanks
Martyn

Excel 2000, Windows Server 2003 over Citrix PS4





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Help with HLOOKUP/INDEX/MATCH

Excellent - that did the trick. Thanks very much for your help!!

Martyn


"akphidelt" wrote in message
...
Try using offset and match

For instance under Export and 2008 put the formula

=Offset(A1,2,Match(A2,B1:X1,0))

Then for the 2007 just add a simple + 1 to the match like

=Offset(A1,2,Match(A2,B1:X1,0)+1)

"WembleyBear" wrote:

Hi

I have a worksheet where the user enters the month they are interested in
the data for from a drop-down box A2. I then had a HLOOKUP to find the
value
from the column for that month. This worked fine. The problem is, each
month
is now going to have 2 columns under it (one for this year & one for last
year) and from what I've read HLOOKUP may no longer be the right solution
and
perhaps INDEX &/or MATCH would be better but I'm struggling with the how
the
formula would read.

The spreadsheet now looks like this below, with month names in row 1
being
centred across each pair of year columns in row 2. My formula goes in row
3
under the Export column. When the user selects, say January in cell A2,
then
in row 3 under Export 2008 it should read 55. If they changed the month
to
February, the formula should return 72.


Month January February Export
January 2008 2007 2008 2007 2008 2007
55 111 72 19


Any help with this would be very much appreciated!

Thanks
Martyn

Excel 2000, Windows Server 2003 over Citrix PS4





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help with HLOOKUP/INDEX/MATCH

Post your current HLOOKUP formula so I can see where everything is. Use
range references and not range names.

--
Biff
Microsoft Excel MVP


"wembleybear" wrote in message
...
Hi

Yes, it does work when using HLOOKUP but because my month heading is
merged over the two year columns the result is as you say, just the
leftmost column. This is fine for 2008 column but I also need to bring the
value from the 2007 column as well into the corresponding Export column,
and that's where I'm stuck with HLOOKUP and thought INDEX and MATCH might
be the answer though I've not used them before.

Martyn




"T. Valko" wrote in message
...
month names in row 1 being centred across
each pair of year columns in row 2.


The month name will be referenced from the leftmost cell and HLOOKUP will
find the leftmost instance so HLOOKUP should still work.

Did you try it and it didn't work?

--
Biff
Microsoft Excel MVP


"WembleyBear" wrote in message
...
Hi

I have a worksheet where the user enters the month they are interested
in
the data for from a drop-down box A2. I then had a HLOOKUP to find the
value
from the column for that month. This worked fine. The problem is, each
month
is now going to have 2 columns under it (one for this year & one for
last
year) and from what I've read HLOOKUP may no longer be the right
solution and
perhaps INDEX &/or MATCH would be better but I'm struggling with the how
the
formula would read.

The spreadsheet now looks like this below, with month names in row 1
being
centred across each pair of year columns in row 2. My formula goes in
row 3
under the Export column. When the user selects, say January in cell A2,
then
in row 3 under Export 2008 it should read 55. If they changed the month
to
February, the formula should return 72.


Month January February Export
January 2008 2007 2008 2007 2008 2007
55 111 72 19


Any help with this would be very much appreciated!

Thanks
Martyn

Excel 2000, Windows Server 2003 over Citrix PS4







  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Help with HLOOKUP/INDEX/MATCH

Hi Martyn

I would make life easier, by using Jan 07, Jan 08, Feb 07 etc. in row 2
Make your dropdown list in A2, have Jan 07 etc as well, then the Hlookup
will work fine, basing it on Row2 with an offset of 2
=HLOOKUP(A2,B2:E3,2,0)

--
Regards
Roger Govier

"wembleybear" wrote in message
...
Hi

Yes, it does work when using HLOOKUP but because my month heading is
merged over the two year columns the result is as you say, just the
leftmost column. This is fine for 2008 column but I also need to bring the
value from the 2007 column as well into the corresponding Export column,
and that's where I'm stuck with HLOOKUP and thought INDEX and MATCH might
be the answer though I've not used them before.

Martyn




"T. Valko" wrote in message
...
month names in row 1 being centred across
each pair of year columns in row 2.


The month name will be referenced from the leftmost cell and HLOOKUP will
find the leftmost instance so HLOOKUP should still work.

Did you try it and it didn't work?

--
Biff
Microsoft Excel MVP


"WembleyBear" wrote in message
...
Hi

I have a worksheet where the user enters the month they are interested
in
the data for from a drop-down box A2. I then had a HLOOKUP to find the
value
from the column for that month. This worked fine. The problem is, each
month
is now going to have 2 columns under it (one for this year & one for
last
year) and from what I've read HLOOKUP may no longer be the right
solution and
perhaps INDEX &/or MATCH would be better but I'm struggling with the how
the
formula would read.

The spreadsheet now looks like this below, with month names in row 1
being
centred across each pair of year columns in row 2. My formula goes in
row 3
under the Export column. When the user selects, say January in cell A2,
then
in row 3 under Export 2008 it should read 55. If they changed the month
to
February, the formula should return 72.


Month January February Export
January 2008 2007 2008 2007 2008 2007
55 111 72 19


Any help with this would be very much appreciated!

Thanks
Martyn

Excel 2000, Windows Server 2003 over Citrix PS4





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
Index, match, or hlookup ~ which function to use @_@ PJS Excel Discussion (Misc queries) 2 May 22nd 07 02:44 AM
HLOOKUP or VLOOKUP or Index or Match or WHAT? MNProp Excel Discussion (Misc queries) 2 May 17th 07 09:55 PM
HLOOKUP, VLOOKUP, MATCH, INDEX - Help with the Right Solution! Michael Excel Discussion (Misc queries) 1 March 28th 07 03:40 PM
vlookup, sumproduct, hlookup, index match, not sure SteveC Excel Discussion (Misc queries) 5 February 15th 07 08:46 PM
VLookUp or HLookUp Plus Index - Match, I think??? Jay Excel Worksheet Functions 11 September 15th 06 07:26 AM


All times are GMT +1. The time now is 07:57 PM.

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"