• 505K Members
• 3,037 Online
• 602K Conversations

## CONDITIONAL FORMATTING USING IF FORMULA

Highlighted
Occasional Visitor

# CONDITIONAL FORMATTING USING IF FORMULA

I am wanting to issue a conditional format for a cell to change from either positive or negative based on whether or not another cell is blank. I was able to come up with a formula that yielded the results i wanted however i would rather not have to add another column for the formula and just make it a condition that would automatically apply.  This is the formula i came up with and an example of what I am doing like i said ideally what is reflected in "d" would automatically condition in "c". On another note i am also trying to apply this condition not only in excel but to a google sheet as well.

=IF(ISBLANK(B4)=TRUE,C4*-1,C4*1)

 ORDER PRO NUMBER TOTAL\$ bob OUT \$5,214.25 \$      5,214.25 bob \$5,614.40 \$   (5,614.40) bob \$529.75 \$       (529.75) bob \$32,000.00 \$ (32,000.00) bob OUT \$193.64 \$         193.64 bob OUT \$3,956.15 \$      3,956.15 bob OUT \$620.50 \$         620.50 bob bob OUT \$247.50 \$         247.50 bob \$396.50 \$       (396.50) bob OUT \$6,051.50 \$      6,051.50 bob OUT \$19,889.37 \$   19,889.37 \$   36,172.91
3 Replies

# Re: CONDITIONAL FORMATTING USING IF FORMULA

Hello @LLOPEZ,

Try this formula:

=A1=""

Change A1 to your desired cell and Apply the formula to your desired range.

Hope this helps!

PReagan

# Re: CONDITIONAL FORMATTING USING IF FORMULA

Hi

If I understand properly, You need a conditional formatting in Column D (or maybe C) that popsup if the Value i is Negative: If so:

Select the cells in Column D (or C depending on where you want the formatting)

Click on the down arrow of Conditional Formatting >> Highlight Cell Rule >> Less than >> Type 0

Select the Format from the drop list (or custom format)

On the other hand, Your IF function can be more simple, as follows:

=IF(B4="",-C4,C4)

Hope that helps

# Re: CONDITIONAL FORMATTING USING IF FORMULA

If that's about automatic conversion of numbers like \$5,614.40 into (\$5,614.40) if the cell to the left is empty - afraid that's only with VBA programming.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
50 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
32 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
15 Replies
Dev channel update to 80.0.355.1 is live
josh_bodner in Discussions on
67 Replies