[Request] Special BB code for formula!

taurean

Well-known Member
Joined
Jun 17, 2011
Messages
2,190
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I was wondering if this could be added (if only has minimum hassles and hurdles). So that we could wrap formula with BBcode like:
=IF(ThisIsPossible=TRUE,"Yes","No")
and
[AFormula]=IF(ThisIsPossible=TRUE,"Yes","No")[/AFormula]
for ARRAY formula [that needs to be CSE'd]
 
Why not use one of the existing tags?
 
Which one do you recommend?
 
I don't know if custom tags are possible. I always put my formulas on a separate line and they seem to do fine. Some put them in code tags (I do too sometimes). Other good ideas are to bold format the formula, or to use courier new (monospace) font to show that it's different. There is a case where occasionally a greater than or less than in a formula is parsed as html and spits out garbage - that's a special case.

Not sure but it looks like you used lucida font and blue font color - I'd say that looks great just so ... :)
But to standardize this properly, we'll just ask from now on that you please use comic sans for your formulas ... ;)

=IF(IsFormula=TRUE,"Comic Sans","Arial")
 
... :)
But to standardize this properly, we'll just ask from now on that you please use comic sans for your formulas ... ;)

=IF(IsFormula=TRUE,"Comic Sans","Arial")
"Comic Sans" kind of looks good but I will reserve those for:
=If(MyFormulaIsThatBad=*Bad,"Bad","VeryBad")
***Caution:=All formula stated in this thread (including yours) are not to be tried on Excel.

I have tried a few of them [1. Set Font 2. Set Color]. I was just looking for a standard option which would let me use something like we do for code tags:
[CODE]SOMECODE[/CODE].

1 step is always better than 2 steps
 
Try HTML tags, they will allow < in formulas.
 
HTML:
If(IsThatGood=True,TRUE,FALSE)
Code:
If(IsThatGood=True,TRUE,FALSE)
PHP:
If(IsThatGood=True,TRUE,FALSE)
What does php do? Seems to format few things on its own. I will try them. Thanks guys!

I will keep my fingers crossed for my wish though :D
 
That should have been a less than sign.
 
I suspect that php would act like html in that it won't try to parse html tags (less than and greater than signs). So that's good for formulas. It will probably also syntax highlight PHP keywords and/or html keywords - probably might make for some interesting colorization but not really right for Excel formulas.

Note that what Norie did in post 6 is correct if you want to put a less than sign in a formula that is *not* enclosed in code tags or html tags - < - except that in this forum (about this board) html is turned off ... . The counterpart to it is > for the greater than sign (these are called html character entities and you can use them in parsed html to display characters in a browser).
 
I suspect that php would act like html in that it won't try to parse html tags (less than and greater than signs). So that's good for formulas. It will probably also syntax highlight PHP keywords and/or html keywords - probably might make for some interesting colorization but not really right for Excel formulas.

Note that what Norie did in post 6 is correct if you want to put a less than sign in a formula that is *not* enclosed in code tags or html tags - < - except that in this forum (about this board) html is turned off ... . The counterpart to it is > for the greater than sign (these are called html character entities and you can use them in parsed html to display characters in a browser).
 

Forum statistics

Threads
1,221,556
Messages
6,160,476
Members
451,649
Latest member
fahad_ibnfurjan

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