Haunted by the returning zero

itsgrady

Board Regular
Joined
Sep 11, 2022
Messages
115
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
Currently I am using conditional formatting to turn the Zero white in a cell to make disappear, but it's turning every number with a zero white. Below is my formula for pulling information from 10 different list. Once the information in the cell $AH$6 matching the one of the list it pulls in the information in. If the cell has no information it puts a zero in the cell. I need to remove the zero in cell.

=IFNA(IFS($AH$6="AS",$BB28,$AH$6="BS",$BF28,$AH$6="CS",$BJ28,$AH$6="DS",$BN28,$AH$6="S1",$AI28,$AH$6="S2",$AJ28,$AH$6="S3",$AK28,$AH$6="S4",$AN28,$AH$6="S5",$AO28,$AH$6="S6",$AP28),"")

Here is formula broken down by one
IFS($AH$6="AS",$BB28)

I pull the above long formula down to auto fill the other cells to copy the entire column range.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Maybe
Excel Formula:
=IFS($AH$6="AS",$BB28,$AH$6="BS",$BF28,$AH$6="CS",$BJ28,$AH$6="DS",$BN28,$AH$6="S1",$AI28,$AH$6="S2",$AJ28,$AH$6="S3",$AK28,$AH$6="S4",$AN28,$AH$6="S5",$AO28,$AH$6="S6",$AP28,1,"")
 
Upvote 0
Maybe
Excel Formula:
=IFS($AH$6="AS",$BB28,$AH$6="BS",$BF28,$AH$6="CS",$BJ28,$AH$6="DS",$BN28,$AH$6="S1",$AI28,$AH$6="S2",$AJ28,$AH$6="S3",$AK28,$AH$6="S4",$AN28,$AH$6="S5",$AO28,$AH$6="S6",$AP28,1,"")

The above formula is auto filled down 7 rows. So, when one of the cells is empty it copies over a zero. The new formula you suggest still places a zero in the cell if the cell is it copying is blank.
 
Upvote 0
Which cells are you talking about?
 
Upvote 0
The above formula returns a zero in the cell that the formula is in (ex: "B2"). If cell BB28 is empty it returns a zero to B2 cell.
 
Upvote 0
In that case what values do you have in those cells, numbers or text.
 
Upvote 0
General - information like:
6:00AM - 6:00PM
 
Upvote 0
In that case if it's text you can concatenate the cells with "" like
Excel Formula:
=IFS($AH$6="AS",$BB28&"",$AH$6="BS",$BF28&"",$AH$6="CS",$BJ28,$AH$6="DS",$BN28,$AH$6="S1",$AI28,$AH$6="S2",$AJ28,$AH$6="S3",$AK28,$AH$6="S4",$AN28,$AH$6="S5",$AO28,$AH$6="S6",$AP28,1,"")
 
Upvote 0
Solution
In that case if it's text you can concatenate the cells with "" like
Excel Formula:
=IFS($AH$6="AS",$BB28&"",$AH$6="BS",$BF28&"",$AH$6="CS",$BJ28,$AH$6="DS",$BN28,$AH$6="S1",$AI28,$AH$6="S2",$AJ28,$AH$6="S3",$AK28,$AH$6="S4",$AN28,$AH$6="S5",$AO28,$AH$6="S6",$AP28,1,"")
No more being haunted by the ZERO. Worked very nicely. Thanks for your help! Now, I wish there was an easy to update all of the formulas. Off to the task of updating the formulas.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,221
Messages
6,123,699
Members
449,117
Latest member
Aaagu

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