#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default HLOOKUP and SUM

Hello there

I need a lookup funtion to find a year to date figure, had a look
through but cant find one to suit.
Spreadsheet looks like this:

1 2 3 4
Jan Feb Mar Apr
10 15 20 18

I have a cell on the sheet stating the period number (1-4) and i need a
function to look up the year to date fugure for that period (ie period
3 would be 45). Function i was trying to use was:

SUM(HLOOKUP(1,'Detailed OH - TSC 06-07
Budget'!$G$8:$R$188,8):HLOOKUP($R$3,'Detailed OH - TSC 06-07
Budget'!$G$8:$R$188,8)) The lookups work fine on their own but not when
i try and sum them.

Any ideas would be fantastic!

Cheers

Brian

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default HLOOKUP and SUM

Hi, Brian-
With your sample data in A1:D3 I got the right results with this
formula:
=SUMPRODUCT(--(A1:D1<=3),A3:D3)

The plain English translation is: "if the value in A1:D1 is less than
or equal to 3, sum the corresponding values in A3:D3".

Dave O

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



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