Conditional formating: "is it a formula or not ?"

Mer1in77

New Member
Joined
Jul 22, 2008
Messages
2
Hi all,

I was wondering if it is possible to somehow use Conditional Formatting to make the text color of whatever is in that cell, say, blue, based on if the value I'm looking at is the result of a formula or if it was entered by hand by a user.

Thanks in advance for all your help guys...
 
Last edited:

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi & Welcome to the Board!

You can distinguish between a formula cell and a non formula cell using an old XLM4 macro function:

1. Select cell A1
2.From xl, go Insert>Name>Define and define a Name called "HasFormula"
3. In the refers to box type:
=GET.CELL(48,!A1)
4. Select the area you want the CF to apply to and go Format>ConditionalFormatting
5. Change to Formula Is and use:
=HasFormula
6. Apply desired format.
 
Upvote 0
1. Select cell A1.
2. Choose Insert->Name->Define from the menu.
3. Enter HasFormula in the Names in workbook box, then in the refersto box enter:
Code:
=GET.CELL(48,!A1)
4. Then select the range you want highlighted, choose Format->Conditional Formatting, change the dropdown to FormulaIs and enter =HasFormula and choose the formatting you require.
HTH
 
Upvote 0
Richard, I seem to remember sometime last year, there was a thread that listed a whole load of XLM4 macros. Do you happen to have the link to this? Or know where I can find a list of them?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p> </o:p>
Cheers
 
Upvote 0
Ok I suspect something isn't going quite right.
When entering GET.CELL(48,!A1) in the refers to box and pressing ok all seems fine.
Then after doing the rest no color change can be seen.
After checking I found that excel has changed it to GET.CELL(48,!A65496)

Now since I like to know what I'm doing, I google'ed that function and found that the 48 is an ID that tells excel what to do in that cell and the rest is some kind of range.

My question is (ofcourse) what's that range got to do with anything ?
Why has excel changed what I input, and what does that exclamation mark do ?



PS: I hate the fact that excel translates formula names :mad: ever tried working in three languages in excel ? it's NUTS !
 
Upvote 0
Don't use !A1.

Use what Tom posted here.

Which I just noticed is very similar to what's in the link Richard posted.:oops:
 
Upvote 0

Forum statistics

Threads
1,222,682
Messages
6,167,612
Members
452,123
Latest member
tstefanakis

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