Sumif to show blank as blank or 0 =SUMIFS(Sheet2!C2:C367,Sheet2!A2:A367,A3,Sheet2!B2:B367,B14)

Luke1690

Board Regular
Joined
Jul 26, 2022
Messages
121
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi All,

I'm using the below formula to show a date when a Day is selected in a range and week.

=SUMIFS(Sheet2!C2:C367,Sheet2!A2:A367,A3,Sheet2!B2:B367,B14)

if a day hasn't been selected and cell B14 is empty, it automatically puts 00/01/1900

how can i make it blank or at least a 0 when no data has been entered?

Thanks for your support.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
It is returning zero - that is what the date 00/01/1900.

It is important to understand how Excel stores dates - it sees them as numbers, literally the number of days since 00/01/1900.
So all dates in Excel really are are numbers with a special date format. You can easily see this by changing the format of any valid date in Excel to "General", and then you will see the date as Excel does.

If you set a Custom Format on the cells of:
dd/mm/yyyy;;
it will hide the zero dates.
 
Upvote 0
Not quite sure which cell(s) are Day/Week, but does this do what you want?
Excel Formula:
=IF(OR(A3="",B14=""),"",SUMIFS(Sheet2!C2:C367,Sheet2!A2:A367,A3,Sheet2!B2:B367,B14))
 
Upvote 0
Solution
Thank you Joe4 i understand why it returned that date now and also a way to fix it to format the cell.

Peter-SSs that worked perfect mate.


Thanks for a speed reply
 
Upvote 0
Thank you Joe4 i understand why it returned that date now and also a way to fix it to format the cell.

Peter-SSs that worked perfect mate.


Thanks for a speed reply
Are you using it in some other sort of calculation or something, where you need it to be physically set to a blank or zero, as opposed to just not being able to see anything in that cell?
Just curious as to why that wouldn't work for you (there may be a legitimate reason...)
 
Upvote 0
Are you using it in some other sort of calculation or something, where you need it to be physically set to a blank or zero, as opposed to just not being able to see anything in that cell?
Just curious as to why that wouldn't work for you (there may be a legitimate reason...)
Yes all of this data will be collected weekly/monthly and stored in another workbook im going to do this automatically using vba. Then from there its going to be uploaded on to a Tableau database. Not sure if your allowed to say Tableau here hahaha!

i don't want any random data in cells when copying.

i know there are many ways this could of been done, one being yours also vba to ignore that date when copying, i just like everything in formulas or codes.

thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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