SUMIF Formula Question-

shipp1ab

New Member
Joined
Dec 16, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I am using the SUMIF formula to pull the sum of each location by month from corresponding sheets, See the photo below for my comparison sheet I am creating.
P1.PNG

We will use the first location "Ann Arbor Education Center" as an example. You will see the current formula I am using above, this is the one I am using because some locations have multiple listings each month, so I want the sum of those. Now, see the photo below, this is my March sheet, the comparison sheet above is pulling 1 which is correct.
P2.PNG

Now, see the photo below, this is my Feb sheet, the comparison sheet above is pulling "0" which is correct.
P4.PNG


Now my question, is there a way to pull either a blank or N/A if there is no data to be found. See photo below for my April sheet. You will see in the comparison sheet above it is putting a "0" for April, but I don't want anything listed if I have no information for that month.
P3.PNG


My preference would be for it to look like one of them below.
P5.PNG
P6.PNG


I am usually pretty good at finding the formulas I need but I am struggling with this one.

Thank you!
 

Attachments

  • P1.PNG
    P1.PNG
    14.6 KB · Views: 18

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi and wlecome to MrExcel!

Try this:
Excel Formula:
=IF(MATCH($A3,'Apr 2023'!$B:$B,0),SUMIF('Apr 2023'!$B:$B,$A3,'Apr 2023'!$D:$D))

NOTE XL2BB:
For the future, it would help greatly if you could give us the sample data in a form that we can copy to test with, rather that a picture.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in
Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.


Example:
Dante Amor
ABCDE
1Segment
2LocationJanFebMarApr
3Ann Arbor#N/A
4Berrien23
Sum
Cell Formulas
RangeFormula
E3:E4E3=IF(MATCH($A3,'Apr 2023'!$B:$B,0),SUMIF('Apr 2023'!$B:$B,$A3,'Apr 2023'!$D:$D))
 
Upvote 0
Hi & welcome to MrExcel.
Another option
Excel Formula:
=IFERROR(1/(1/SUMIF('Apr 2023'!$B:$B,$A3,'Apr 2023'!$D:$D)),"")
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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