Two Formulas in one cell. Need to remove the return zero

itsgrady

Board Regular
Joined
Sep 11, 2022
Messages
115
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
=IFNA(IFS($D$3=$S$3,T5,$D$3=$U$3,V5),"") :Returns information in one column. The next day the other information goes in the column.

Returns a zero when empty need to remove the zero. The formula works well but for the zero when blank. If was able to remove zero for only day but not for the other day.

=IFNA(IF(T5="","",IFS($D$3=$S$3,T5,$D$3=$U$3,V5),"") )


The sheet has sixty rows with information in both S and U columns where the information stored for a daily form. The formula works well but it returns a zero when there is not information in a given cell in either column. The information goes in one column depending on the day it will pull information from one the columns in the calculation. I need different information each day and the two columns have different information but for the same form on a given day.

=IFNA(IFS($D$3=$S$3,T5,$D$3=$U$3,V5),"")
=IFNA(IFS($D$3=$S$3,T6,$D$3=$U$3,V6),"")
=IFNA(IFS($D$3=$S$3,T7,$D$3=$U$3,V7),"")
=IFNA(IFS($D$3=$S$3,T8,$D$3=$U$3,V8),"")
=IFNA(IFS($D$3=$S$3,T5,$D$3=$U$3,V5),"").... all the way to V65
 

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.
=IFNA(IFS($D$3=$S$3,T5,$D$3=$U$3,V5),"") :Returns information in one column. The next day the other information goes in the column.

Returns a zero when empty need to remove the zero. The formula works well but for the zero when blank. If was able to remove zero for only day but not for the other day.

=IFNA(IF(T5="","",IFS($D$3=$S$3,T5,$D$3=$U$3,V5),"") )


The sheet has sixty rows with information in both S and U columns where the information stored for a daily form. The formula works well but it returns a zero when there is not information in a given cell in either column. The information goes in one column depending on the day it will pull information from one the columns in the calculation. I need different information each day and the two columns have different information but for the same form on a given day.

=IFNA(IFS($D$3=$S$3,T5,$D$3=$U$3,V5),"")
=IFNA(IFS($D$3=$S$3,T6,$D$3=$U$3,V6),"")
=IFNA(IFS($D$3=$S$3,T7,$D$3=$U$3,V7),"")
=IFNA(IFS($D$3=$S$3,T8,$D$3=$U$3,V8),"")
=IFNA(IFS($D$3=$S$3,T5,$D$3=$U$3,V5),"").... all the way to V65
I'm currently using the format cell to remove the zero - 0:-0;;@ - works well but it does limit me some. Thanks.
 
Upvote 0
Could you give a small set of sample data with XL2BB and explain examples in relation to that sample data? I'm not quite sure which cells being empty are the problem. Is it $S$3 and/or $U$3 and/or T5 and/or V5 and/or $D$3?
 
Upvote 0
Could you give a small set of sample data with XL2BB and explain examples in relation to that sample data? I'm not quite sure which cells being empty are the problem. Is it $S$3 and/or $U$3 and/or T5 and/or V5 and/or $D$3?
I have two columns with different names. I put the word "C Shift" in cell $D$3 and it pulls all the names from column "T" in the column "D" of the form I use. The next day I put the word "D Shift" in cell $D$3 and it pulls all the names from column "V" in the column "D" of the form I use. In all the cells of the D column I have the formula to read each row of column T or V. I am not not adding or dividing. When there is no data in the T or V column it returns a zero in the D column.
 
Upvote 0
Thanks for the clarification. Try this formula.

Excel Formula:
=IF(AND(D$3=S$3,T5<>""),T5,IF(AND(D$3=U$3,V5<>""),V5,""))
 
Upvote 0
Solution
Thanks for the clarification. Try this formula.

Excel Formula:
=IF(AND(D$3=S$3,T5<>""),T5,IF(AND(D$3=U$3,V5<>""),V5,""))
Thanks for the help.. So that I can understand a little better--what does T5<>"" do?
 
Upvote 0
Thanks for the clarification. Try this formula.

Excel Formula:
=IF(AND(D$3=S$3,T5<>""),T5,IF(AND(D$3=U$3,V5<>""),V5,""))
Thank you very much... This code works very well and the "0" disappeared. I need to learn how to use the "and" function.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,538
Members
449,038
Latest member
Guest1337

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