+ Reply to Thread
Results 1 to 10 of 10

Formulas and Code Tags

  1. #1
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Formulas and Code Tags

    What's the general preference with moderators and guru's concerning whether Excel formulas should have code tags?

    Do you like to see formulas in code tags always?
    if over a certain length?
    never?

    I've heard both so am curious.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formulas and Code Tags

    I put formulas in code tags only if I deliberately show the formula split over two or more lines to highlight the regularity of recurring similar expressions.

    Otherwise, I think it reinforces the confusion some people have between code and formulas.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formulas and Code Tags

    I sit on the other side of the fence to shg and always post formulae in CODE tags.

    First reason:

    There is an (as yet unresolved) issue with the board software that results in spurious spaces being added within lengthy functions.
    This can lead to errors when the formulae are copied/pasted by OP.
    The CODE tags remove that issue.

    Second reason:

    From an aesthetics perspective I confess I prefer the clear divide between narrative and functional content.

    I think the overall preference of the Board is that CODE tags be used only fo Code.
    However, until such time as the above bug is rectified I'm not sure it's a valid standpoint.

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Formulas and Code Tags

    maybe the PHP code-tags are a better alternative to formulae (it looks very similar to Excel' help when editing a formula.)

    PHP Code: 
    =SUMPRODUCT((A1:M20=50)*(A1:M20<>"")*A1:m20
    Last edited by snb; 01-05-2011 at 06:07 AM.



  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Formulas and Code Tags

    The board also removes what it considers extra spaces.
    It was a problem here
    http://www.excelforum.com/excel-gene...g-of-text.html

    One fix in this example was to use code tags around the formula.

    I can see shgs' point
    Otherwise, I think it reinforces the confusion some people have between code and formulas
    but in my opinion tags fix more problems than they cause.

    Is it a big deal to have dedicated formula tags
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    as an option?

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formulas and Code Tags

    I like the PHP tag. What's that stand for?

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formulas and Code Tags

    PHP is a scripting language: http://en.wikipedia.org/wiki/PHP

    These pages are coded in php and utilise a MySQL backend... it's a classic "open source" combo.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formulas and Code Tags

    Simon's TheCodeCage forum does have separate
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    tags.. so I am sure it is possible... but to get it implemented here is another story....
    Last edited by royUK; 01-05-2011 at 10:28 AM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formulas and Code Tags

    I think the overall preference of the Board is that CODE tags be used only for Code.
    I wasn't aware of that.

    I also use code tags for posting tabular data, in conjunction with my CopyRng (free to all) add-in:

    Please Login or Register  to view this content.
    Oz, where they really don't like code tags for anything but code, has an "ss" tag for this purpose.

    ... spurious spaces being added within lengthy functions.
    That only happens if you have (I think) 50 characters without a space. I'm fond of white space in formulas for readability, so it's not a problem for me.

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,265

    Re: Formulas and Code Tags

    The PHP tags would be perfect if they could be altered to not show 'PHP code' above them!
    Remember what the dormouse said
    Feed your head

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1