Sumif blank row and nearest value

samitnair

Board Regular
Joined
Jul 5, 2010
Messages
155
Hello Everyone,

I am using sumif function to calculate an amount based on criteria (A2:D2) but whenever there is a blank cell in the Region column the result turns to be "Zero". I am thinking if we can skip the blank cell to get the result.

I tried the "*" and "<>" but ends up with too many arguments or #Value .

ABCDEF
1NameTypeResourceRegionQuantityAmount
2AAA123US100=SUMIFS('EA Report'!$L:$L,'EA Report'!$C:$C,Play!$A2,'EA Report'!$D:$D,Play!$C2,'EA Report'!$J:$J,Play!D2)
3BBB456UK50
4GGG456125Blank or Zero

<tbody> </tbody>
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Not very clear. Do you mean this?

=SUMIFS('EA Report'!$L:$L,'EA Report'!$C:$C,$A2,'EA Report'!$D:$D,$C2,'EA Report'!$J:$J,IF($D2="","?*",$D2))

The formula is assumed to be located in the Play sheet.
 
Upvote 0
Hello Aladin,



EA Report
CDJL
1NameResourceRegionAmount
2AAA123US100
3BBB456UK50
4GGG

<tbody>
</tbody>
456Japan200

<tbody>
</tbody>
Play

ABCDEF
1NameTypeResourceRegionQuantityAmount
2AAA123US100=SUMIFS('EA Report'!$L:$L,'EA Report'!$C:$C,Play!$A2,'EA Report'!$D:$D,Play!$C2,'EA Report'!$J:$J,Play!D2)
3BBB456UK50
4GGG456125Blank or Zero

<tbody>
</tbody>


So if I consider Row 3, Sumifs will search in EA report and match A3,C3,D3 and sum the value. In sheet "EA report" all the cells have value but in sheet play the region can be empty/blank. I want sumif to skip the blank (if any) and give me the nearest value which matches the other criteria. I have given the below example in sheet play (Japan is missing but it still gave 200). Any such suggestions


ABCDEF
1NameTypeResourceRegionQuantityAmount
4GGG456125200

<tbody>
</tbody>

I am open to change the format or formula and more than glad to learn excel. I appreciate your time.
 
Last edited:
Upvote 0
I want there 200.

That is what the formula already propsed does...

EA Report

NameResourceRegionAmount
AAA123US100
BBB456UK50
GGG456Japan200

<tbody>
</tbody>

Play

NameTypeResourceRegionQuantityAmount
AAA123US100100
BBB456UK5050
GGG456125200

<tbody>
</tbody>

In F2 enter and copy down:

=SUMIFS('EA Report'!$L:$L,'EA Report'!$C:$C,$A2,'EA Report'!$D:$D,$C2,'EA Report'!$J:$J,IF($D2="","?*",$D2))
 
Upvote 0

Forum statistics

Threads
1,214,534
Messages
6,120,080
Members
448,943
Latest member
sharmarick

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