FedElecQaEng
New Member
- Joined
- Sep 25, 2023
- Messages
- 12
- Office Version
- 2010
- Platform
- Windows
I make use of the If statement a lot and sometimes the formula returns a 0. When the main formula returns a zero I want it to show the dash character so I usually make a formula like this:
=If(*Formula* = 0,"-",*Formula*)
My main question is if there is a way to not have to repeat the formula twice especially since sometimes the main formula can fill up more than half the formula bar, and sometimes I make changes to the main formula (making the same change twice multiple times can get annoying and time-consuming).
Something I would like is similar to the IFERROR function where, if the formula returns an error then return a different value, else return the formula value (In these cases I also make use of the "-" character)
Following the IFERROR format, a made-up formula that I can imagine as an example would be like =IFVAL([logical formula],[value],[value_if_same]). So if [logical formula] returns the value in [value] then IFVAL returns the [value_if_same] else IFVAL returns the value from [logical formula]
=If(*Formula* = 0,"-",*Formula*)
My main question is if there is a way to not have to repeat the formula twice especially since sometimes the main formula can fill up more than half the formula bar, and sometimes I make changes to the main formula (making the same change twice multiple times can get annoying and time-consuming).
Something I would like is similar to the IFERROR function where, if the formula returns an error then return a different value, else return the formula value (In these cases I also make use of the "-" character)
Following the IFERROR format, a made-up formula that I can imagine as an example would be like =IFVAL([logical formula],[value],[value_if_same]). So if [logical formula] returns the value in [value] then IFVAL returns the [value_if_same] else IFVAL returns the value from [logical formula]