SUMIF with varying number of rows

Pirlo81

New Member
Joined
Jun 9, 2022
Messages
1
Hello

I am trying to do a SUMIF function in one sheet that reads the info from another sheet. The problem is that the data on the sheet I am running the SUMIF on is copied and pasted so the number of rows varies every time. How can I accommodate this in the SUMIF? I tried to account for this by making the range of rows large to accommodate whatever number of rows that are pasted but the problem is that if the rows are empty, the formula returns an error. How can I make the SUMIF function ignore the blank rows?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You could construct a dynamic array that will determine the lower extent of the range and adjust the range accordingly. Alternatively, you could convert the data to be summed to an official Excel table and use structured references that will operate on the entire column referenced. Do you have a small sample showing what you want to do? What version of Excel are you using?
 
Upvote 0
Alternatively, if you have Excel 365, you could use the FILTER function to eliminate any empty cells in an overly large range.
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,590
Members
449,039
Latest member
Arbind kumar

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