Sum without hidden rows and text

schang_825

Board Regular
Joined
Feb 19, 2010
Messages
66
Hi All,

I currently have a spreadsheet without both numbers and text in the cell. The text is required for conditional formatting. At the bottom of the columns, I wanted to sum only the numbers and also to exclude hidden rows. I currently have an array formula to sum the numbers, but can't seem to figure out how to exclude the hidden rows:

=SUM(IF(ISNUMBER(SEARCH("Pre-Con",E12:E66)),SUBSTITUTE(E12:E66,CHAR(10)&"Pre-Con","")+0))+SUM(IF(ISNUMBER(SEARCH("Const",E12:E66)),SUBSTITUTE(E12:E66,CHAR(10)&"Const","")+0))+ SUM(IF(ISNUMBER(SEARCH("Post-Con",E12:E66)),SUBSTITUTE(E12:E66,CHAR(10)&"Post-Con","")+0))

Any help would be greatly appreciated!!

Thanks!!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Conditional formatting of one cell can also work based on the values of adjacent cells. I would recommend putting your text in one column and numbers in the next, adjust your conditional formatting to color based on the content of the text in the adjacent cell as needed.

Then you can greatly simplify your formulas and employ the SUBTOTAL() function which, by design, will only total visible rows.
 
Upvote 0
Thank you for your reply. I didn't want to create extra rows for the text, but you're right. The formulas are much simpler once I split the text and numbers into different cells.
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,462
Members
452,915
Latest member
hannnahheileen

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