Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bc
 
Posts: n/a
Default Problems with INDEX formula

I have a range of vehicles splited by mileage (a row with 10 categories) and
in another sheet I have other categories that I have to sum the vehicles of
the nearest higher mileage range. Ex

Model 10.000 20.000 30.000 40.000 50.000 60.000
.........
X 2 3 5 3
8 9
Y 4 2 3 2
7 4
Z 5 7 2 1
6 5

and I need to know the sum vehicles of around and higher 44.000 miles which
in this specific case is inside the 50.000miles range and should return
21(sum of vehicles inside this category)
I can not use if conditions cause I ´m limited to 7 whereas I have 10
categories.
Is there anybody who can help me?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Problems with INDEX formula

Assume the table is A1:G4 with the mileage in B1:G1, the Model header in A1,
then model type in A2:A4 and the numerical data in B2:G4

=SUM(OFFSET($A$1,1,MATCH(SMALL(A1:G1,COUNTIF(A1:G1 ,"<"&K1)+1),A1:G1,0)-1,ROWS(A1:G4)-1,))

will return 21, a non volatile version

=SUM(INDEX(A1:G4,2,MATCH(SMALL(A1:G1,COUNTIF(A1:G1 ,"<"&K1)+1),A1:G1,0)):INDEX(A1:G4,ROWS(A1:G4),MATC H(SMALL(A1:G1,COUNTIF(A1:G1,"<"&K1)+1),A1:G1,0)))



--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"bc" wrote in message
...
I have a range of vehicles splited by mileage (a row with 10 categories)
and
in another sheet I have other categories that I have to sum the vehicles
of
the nearest higher mileage range. Ex

Model 10.000 20.000 30.000 40.000 50.000
60.000
.........
X 2 3 5 3
8 9
Y 4 2 3 2
7 4
Z 5 7 2 1
6 5

and I need to know the sum vehicles of around and higher 44.000 miles
which
in this specific case is inside the 50.000miles range and should return
21(sum of vehicles inside this category)
I can not use if conditions cause I ´m limited to 7 whereas I have 10
categories.
Is there anybody who can help me?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Problems with INDEX formula

Another option that uses a much less complicated formula:

If you had your table in descending order:

Rather than like this:

10....20....30....40....50.....60

Do this:

60....50....40....30....20....10

Then:

=SUM(INDEX(B2:G4,,MATCH(44,B1:G1,-1)))

Biff

"Peo Sjoblom" wrote in message
...
Assume the table is A1:G4 with the mileage in B1:G1, the Model header in
A1, then model type in A2:A4 and the numerical data in B2:G4

=SUM(OFFSET($A$1,1,MATCH(SMALL(A1:G1,COUNTIF(A1:G1 ,"<"&K1)+1),A1:G1,0)-1,ROWS(A1:G4)-1,))

will return 21, a non volatile version

=SUM(INDEX(A1:G4,2,MATCH(SMALL(A1:G1,COUNTIF(A1:G1 ,"<"&K1)+1),A1:G1,0)):INDEX(A1:G4,ROWS(A1:G4),MATC H(SMALL(A1:G1,COUNTIF(A1:G1,"<"&K1)+1),A1:G1,0)))



--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"bc" wrote in message
...
I have a range of vehicles splited by mileage (a row with 10 categories)
and
in another sheet I have other categories that I have to sum the vehicles
of
the nearest higher mileage range. Ex

Model 10.000 20.000 30.000 40.000 50.000 60.000
.........
X 2 3 5 3
8 9
Y 4 2 3 2
7 4
Z 5 7 2 1
6 5

and I need to know the sum vehicles of around and higher 44.000 miles
which
in this specific case is inside the 50.000miles range and should return
21(sum of vehicles inside this category)
I can not use if conditions cause I ´m limited to 7 whereas I have 10
categories.
Is there anybody who can help me?





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Problems with INDEX formula

fwliw .. I've just plonked another crack in your earlier post
(missed your repeat posting here, ugh ...)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
Array Formula Limits (around 2800 or so) ? Lotus DSUM has no problems with it ! xlguy Excel Discussion (Misc queries) 6 December 15th 05 06:24 PM
COUNTIF formula problems artisanpp Excel Discussion (Misc queries) 2 June 5th 05 01:30 AM
Sum and Index formula? Luke Excel Discussion (Misc queries) 2 April 6th 05 12:58 PM
How to add in an array formula if iisna index match taxmom Excel Worksheet Functions 4 March 15th 05 01:51 PM
Problems with the VLOOKUP formula Peter Excel Worksheet Functions 2 March 9th 05 03:59 AM


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