Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Amy Amy is offline
external usenet poster
 
Posts: 165
Default Hlookup and sum noncontiguous numbers

I need help with the following problem: I was using the nested if function,
but due to limitation of seven levels only, i need to find alternative
solution to my problem.
I want to be able to use hlookup combined with the sum function to add up
noncontiguous numbers. Here's my formula to extract and sum data for June -
fringe:

z1=jun
=hlookup(z1,a1:g8,sum(2,6),false))
i want to add up fringe for month of june = 450
currently this formula yield = 0
2 3 4 5 6 7 8 9
1 jan feb mar apr may jun jul aug...dec
2Salary FT 500 550 600 500 550 600 500 550
3Hourly FT 400 450 500 400 450 500 400 450
4Fringe FT 300 350 400 300 350 400 300 350
5
6Salary PT 250 250 250 250 250 250 250 250
7Hourly PT 200 200 200 200 200 200 200 200
8Fringe PT 150 150 152 141 90 50 85 125

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Hlookup and sum noncontiguous numbers

One idea to get there ..

Illustrated in this sample:
http://www.freefilehosting.net/download/3i9fj
sum discontiguous via lookup month n partial text.xls

In B1 across are the months in text; jan, feb,...
In A2:A8 are the text: Salary FT, Hourly FT, etc

Assume
Inputs for the month (eg: jun) are selected in Y1
Inputs for partial text in col A (eg: Fringe) are selected in Y2

Then in Y3:
=IF(COUNTA(Y1:Y2)<2,"",SUMPRODUCT(--(ISNUMBER(SEARCH(Y2,$A$2:$A$8))),OFFSET($A$2:$A$8, ,MATCH(Y1,$B$1:$J$1,0))))
will return the required results
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Amy" wrote:
I need help with the following problem: I was using the nested if function,
but due to limitation of seven levels only, i need to find alternative
solution to my problem.
I want to be able to use hlookup combined with the sum function to add up
noncontiguous numbers. Here's my formula to extract and sum data for June -
fringe:

z1=jun
=hlookup(z1,a1:g8,sum(2,6),false))
i want to add up fringe for month of june = 450
currently this formula yield = 0
2 3 4 5 6 7 8 9
1 jan feb mar apr may jun jul aug...dec
2Salary FT 500 550 600 500 550 600 500 550
3Hourly FT 400 450 500 400 450 500 400 450
4Fringe FT 300 350 400 300 350 400 300 350
5
6Salary PT 250 250 250 250 250 250 250 250
7Hourly PT 200 200 200 200 200 200 200 200
8Fringe PT 150 150 152 141 90 50 85 125

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
average of 12 noncontiguous cells goss[_2_] Excel Discussion (Misc queries) 6 November 12th 07 10:26 PM
Vlookup/hlookup without using row or column numbers Dawn - KY Excel Worksheet Functions 6 May 7th 07 05:09 PM
Noncontiguous rows KC8DCN Excel Discussion (Misc queries) 3 August 18th 06 05:34 AM
noncontiguous cells Vivian Excel Discussion (Misc queries) 2 July 21st 06 01:00 AM
Averaging noncontiguous numbers ignoring zeros? Mike Excel Worksheet Functions 19 March 4th 05 02:05 AM


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