Excel Tip: Simple Custom Numbers Formatting Based on Their Sign

%3CLINGO-SUB%20id%3D%22lingo-sub-1543497%22%20slang%3D%22en-US%22%3EExcel%20Tip%3A%20Simple%20Custom%20Numbers%20Formatting%20Based%20on%20Their%20Sign%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1543497%22%20slang%3D%22en-US%22%3E%3CP%3EWith%20the%20Method%20shown%20in%20the%20video%2C%20you%20do%20not%20need%20to%20resort%20to%20conditional%20formatting.%3C%2FP%3E%3CP%3EJust%20go%20to%20%3CSTRONG%3EFormat%20Cells%3C%2FSTRONG%3E%20%3A%3A%20%3CSTRONG%3ECustom%3C%2FSTRONG%3E%20and%20input%20your%20formatting%20rules%3A%3C%2FP%3E%3CP%3Ei.e.%3A%26nbsp%3B%3CSPAN%3E%5Bblue%5D%200%2C00%20%22%20kg%22%20%3B%20%5Bred%5D%20(0)%20%22%20km%22%20%3B%20%5Bgreen%5D%20%22Nothing%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EA%20detailed%20explanation%20is%20shown%20in%20the%20video%20below%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fyoutu.be%2F47GuemDj8T4%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fyoutu.be%2F47GuemDj8T4%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1543497%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETraining%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1545800%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Tip%3A%20Simple%20Custom%20Numbers%20Formatting%20Based%20on%20Their%20Sign%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1545800%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F738844%22%20target%3D%22_blank%22%3E%40zaittworks%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'll%20have%20to%20say%20that%20I%20started%20viewing%20this%20with%20a%20lot%20of%20skepticism%3A%20%22I%20mean%2C%20conditional%20formatting%20isn't%20all%20that%20difficult!!%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20I%20ended%20realizing%20that%20for%20some%20situations%20that%20could%20indeed%20be%20useful...I%20hadn't%20realized%20that%20custom%20formats%20could%20handle%20text%20mixed%20in%20with%20numbers%2C%20to%20say%20nothing%20of%20the%20colors.%20So%20I'll%20keep%20that%20in%20my%20bag%20of%20tricks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20do%20have%20a%20question%3A%20Your%20example%20dealt%20only%20with%20positive%2C%20negative%20and%20zero%20values%3B%20can%20the%20custom%20formatting%20handle%20different%20colors%20based%20on%20values%20in%20the%20given%20cell%20compared%20with%20other%20cells%3F%20For%20example%2C%20a%20date%20within%2030%20days%20of%20another%20date%20in%20green%2C%20but%20greater%20than%2030%20days%20displays%20in%20black%3F%20Or%20does%20that%20kind%20of%20user-defined%20condition%20still%20require%20conditional%20formatting%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1545809%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Tip%3A%20Simple%20Custom%20Numbers%20Formatting%20Based%20on%20Their%20Sign%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1545809%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20there%2C%20thanks%20for%20the%20question.%20For%20that%20you%20DO%20need%20conditional%20formatting%2C%20at%20least%20as%20far%20as%20I%20know.%3C%2FP%3E%3CP%3EYour%20example%20is%20a%20perfect%20candidate%20for%20conditional%20formatting%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20thing%20about%20this%20hack%20is%20that%20you%20can%20quickly%20type%20it%20in.%20Wehn%20more%20complex%20formats%20are%20required%2C%20I%20would%20turn%20to%20conditional%20formatting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1545828%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Tip%3A%20Simple%20Custom%20Numbers%20Formatting%20Based%20on%20Their%20Sign%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1545828%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F738844%22%20target%3D%22_blank%22%3E%40zaittworks%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInteresting.%3C%2FP%3E%3CP%3ESo%20custom%20formatting%20hacks%20can%20do%20simple%20things%20with%20complexity.%3C%2FP%3E%3CP%3EWhile%20conditional%20formatting%20is%20required%20to%20do%20complex%20things%20simply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20like%20the%20symmetry!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1546287%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Tip%3A%20Simple%20Custom%20Numbers%20Formatting%20Based%20on%20Their%20Sign%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1546287%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3Asmiling_face_with_smiling_eyes%3A%20You%20hit%20it%20on%20the%20nail%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

With the Method shown in the video, you do not need to resort to conditional formatting.

Just go to Format Cells :: Custom and input your formatting rules:

i.e.: [blue] 0,00 " kg" ; [red] (0) " km" ; [green] "Nothing"

 

A detailed explanation is shown in the video below

https://youtu.be/47GuemDj8T4

Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
4 Replies
Highlighted

@zaittworks 

 

I'll have to say that I started viewing this with a lot of skepticism: "I mean, conditional formatting isn't all that difficult!!"

 

But I ended realizing that for some situations that could indeed be useful...I hadn't realized that custom formats could handle text mixed in with numbers, to say nothing of the colors. So I'll keep that in my bag of tricks.

 

I do have a question: Your example dealt only with positive, negative and zero values; can the custom formatting handle different colors based on values in the given cell compared with other cells? For example, a date within 30 days of another date in green, but greater than 30 days displays in black? Or does that kind of user-defined condition still require conditional formatting?

Highlighted

@mathetes 

 

Hi there, thanks for the question. For that you DO need conditional formatting, at least as far as I know.

Your example is a perfect candidate for conditional formatting

 

The thing about this hack is that you can quickly type it in. Wehn more complex formats are required, I would turn to conditional formatting.

 

Highlighted

@zaittworks 

 

Interesting.

So custom formatting hacks can do simple things with complexity.

While conditional formatting is required to do complex things simply.

 

I like the symmetry!!

Highlighted