Reference all numerical values in a column EXCEPT for last value

nc_waggoner

New Member
Joined
Sep 2, 2016
Messages
21
I have a sheet with a counter in column D and associated times in column E as numerical milliseconds (ex. 72996 or 72.9 seconds). I am trying to figure out a way to sum the values above a certain limit (900,000) on all rows with a time with the exception of the last row which always provides bad data (due to the program). In the example below, I need to sum blocks 2 and 9 since they are above 900,000 but NOT block 12 since it is the last row. Please help! :mad:

[TABLE="width: 200"]
<tbody>[TR]
[TD="align: center"]Number[/TD]
[TD="align: center"]Time[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]100001[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]1200000[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]86989[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]86007[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]103011[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]72996[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]101014[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]91998[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]1400000[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]127005[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]73994[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]2000000000[/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
If there are no gaps in the range, and the cell after the last value is empty, then maybe:

=SUMPRODUCT(B2:B13,--(B2:B13>D2),--(B3:B14<>""))

where D2 has 900,000 and B2:B13 is your range. Note the 1-row offset in the last range.
 
Last edited:
Upvote 0
How about this:

=SUMIF(E2:E13,">900000")-SUMIF(D2:D13,MAX(D2:D13),E2:E13)


igold
 
Upvote 0
Eric,

The rows after are not blank. It is either a "-" or N/A. This is just how the data is pulled in from Historian
 
Upvote 0
Also I should mentioned that the information is dynamic and the last row value changes daily...could be row 900 and then 875 the next day
 
Upvote 0
Additionally, sorry for not putting this on one ... the "Number" column cannot be referenced unless you copy and paste as a value. The data comes out in a format that Excel does not like/recognize...the "time" column seems to be work with formulas
 
Upvote 0
For dynamic last row...

=SUMIF(E:E,">900000")-SUMIF(D:D,MAX(D:D),E:E)


igold
 
Upvote 0
If excel cannot read column D then how about this:

=SUMIF(E:E,">900000")-INDIRECT("E"&COUNTA(E:E))

igold
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,103
Members
452,379
Latest member
IainTru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top