LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Summing values, x rows deep, depending on a criterion

I've used the following formula
=IF($E$4=1;C11;IF($E$4=2;SUM(C11:C12);IF($E$4=3;SU M(C11:C13);IF($E$4=4;SUM(C11:C14);"na"))))
to sum values in either one, two, three or four rows of data, depending on
the value in cell E4. If I want to go beyond the value 4 I need to add
another nested If statement.

Can I generate a formula that expands the sum range, depending on the value
of cell E4?
--
Martin Kleiner
 
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
Delete rows that don't meet specific criterion SITCFanTN New Users to Excel 5 June 5th 06 12:34 PM
Sum Count of Numeric Criterion for LAST 5 Rows Sam via OfficeKB.com Excel Worksheet Functions 5 April 18th 06 06:31 PM
counting rows depending on 2 selective values Acid-Sky Excel Discussion (Misc queries) 1 September 1st 05 05:45 PM
summing up contents on ceratin cells depending on selection criter Charles Excel Worksheet Functions 1 July 21st 05 10:52 PM
How do I get the number of rows that meet an autofilter criterion. hako Excel Worksheet Functions 4 November 19th 04 04:09 PM


All times are GMT +1. The time now is 02:19 AM.

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"