+ Reply to Thread
Results 1 to 2 of 2

Cell Comment Formatting, from VBA

  1. #1
    Registered User
    Join Date
    05-19-2016
    Location
    uk
    MS-Off Ver
    2010
    Posts
    18

    Cell Comment Formatting, from VBA

    ok, so i have some cells, which have a comment applied to each, based on specific criteria, here's the code i have so far....


    Please Login or Register  to view this content.

    now this works, exactly as i expected, it will produce the comment as per the code, and it will look like this

    Current Value:
    £ 3456.25
    and when the value hits a minus figure, it switches to red text, however, it does 2 things that i'd like to alter

    1. the negative values, show in red, but with no "-" symbol
    2. it messes with the number formats, for example £ 1350.50 will come out formatted as "£ 1350.5" ..... i don't want to lose the trailing 0, and i'd also like to format the numerical value as £ 1,350,50 if possible.


    Anyone have any idea how i can manipulate the formatting, or do i need to manipulate it whilst building the comment text ?

  2. #2
    Registered User
    Join Date
    05-19-2016
    Location
    uk
    MS-Off Ver
    2010
    Posts
    18

    Re: Cell Comment Formatting, from VBA

    i got it, it wasn't so hard when i realised i needed to format it before putting it into the comment


    changed the line building the text and adding the comment to this

    Please Login or Register  to view this content.
    and voila, perfect, as for the minus symbol, i was getting confused, it would not show that, because the value whilst less than the cost, would not be a negative value

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Check if cell in range is empty, if it is delete comment else format comment to
    By banaanas in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2015, 01:15 AM
  2. Conditional formatting based on internal cell comment
    By dminkov in forum Excel General
    Replies: 7
    Last Post: 04-23-2014, 03:47 AM
  3. Conditional Formatting if cell contains a comment
    By lorne17 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-25-2014, 11:13 AM
  4. Conditional formatting if same cell contains a comment
    By theirishdancer in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-24-2014, 07:12 PM
  5. Replies: 10
    Last Post: 10-07-2012, 04:50 PM
  6. Cell Comment Formatting
    By PosseJohn in forum Excel General
    Replies: 5
    Last Post: 02-14-2012, 05:44 PM
  7. Replies: 2
    Last Post: 11-09-2005, 02:45 PM

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