+ Reply to Thread
Results 1 to 11 of 11

Add multiple comments to a cell.

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,955

    Add multiple comments to a cell.

    I'm making a problem checker for a report that contains 12K rows, and 33 columns. My tentative code is below, which highlights the problem cell. Since my users might not understand why a cell is highlighted, I'd also like, in column AH, to put the problem number, and have a legend at the top, kind of like
    1 means there's a PRSTX unit, 2 means an FTE count of Zero, etc.
    My problem is that any one row could have multiple problems, so I need a routine to check and see if AH for that row contains a value, and if so put that value, a comma, and the new step number in the cell, otherwise just put the step number. I'd apprecaite some help in making that part, because I'm confused on how to do it.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Add multiple comments to a cell.

    Hi Jomili,
    maybe so
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,955

    Re: Add multiple comments to a cell.

    Nilem,
    It's a thing of beauty, but I'm not sure what it is. When I run it, I see that it puts Step1, Step2, etc at the end of the respective rows, but I don't understand how. If it's supposed to replace my code above, it's not highlighting the cells. If if it's meant to run after I finish my code, then sorry if I misled you, but the steps I outlined are just the beginning; there are about 14 steps I envision so far, and maybe more as times goes by, so I need something I can understand, replicate, expand and reuse. So, if you want to guide me through how this thing workds I'd love to learn something new.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Add multiple comments to a cell.

    maybe it would be clearer
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,955

    Re: Add multiple comments to a cell.

    Nilem,
    Sorry I couldn't get back sooner.

    You really rock. Not only do you write good code, you even break it down so simpletons like me can understand it. I can follow what you've done for my other steps. Thank you so much for your help and your understanding!

  6. #6
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,955

    Re: Add multiple comments to a cell.

    I spoke too soon. I DID understand how to add steps, but I've had to add a column, so want the Step values to go in AI instead of AH. I changed the range like this, thinking that would do the trick:
    Please Login or Register  to view this content.
    but it still puts the values in AH. I thought I understood, but apparently don't understand, what Y() is, and don't understand the siginificance to the Ampersand after i& and k&. If you'd care to explain I'd love to learn. My current code is shown below. Thanks,
    John
    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,955

    Re: Add multiple comments to a cell.

    found it: sometimes my obtuseness astounds even me. Changed
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Add multiple comments to a cell.

    About "Ampersand after i& and k&". It is an abbreviation for variable types
    & means Long (so Dim i& is the same as Dim i as Long)
    # - Double
    % - Integer
    etc.

  9. #9
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,955

    Re: Add multiple comments to a cell.

    Sweet! I never knew that. Do you know where I could find a list of the all the abreviated codes like that? I'd like to have a resource to find these things on my own.

  10. #10
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Add multiple comments to a cell.

    These abbreviations are not many
    & - Long
    % - Integer
    # - Double
    ! - Single
    @ - Currency
    $ - String
    it seems that's all

    edited:
    Please note, the best practice is still fully variable declaration like Dim i as Long (not Dim i&)
    Last edited by nilem; 06-30-2015 at 01:55 PM.

  11. #11
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,955

    Re: Add multiple comments to a cell.

    Nilem,
    I just saw your edit; is that Best Practice because simpletons like me get confused by the shortcuts?

+ 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. copy cell text to comments in excel 2010 and vise versa (i.e. from comments to cell)
    By senthile in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-25-2014, 12:16 PM
  2. Change Size of Multiple Cell Comments Simultaneously
    By dompoma in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-31-2013, 11:33 PM
  3. A macro which will search for multiple comments and put them all into one cell?
    By Kitsan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2012, 08:32 PM
  4. [SOLVED] multiple individual comments in one cell
    By D2DS in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-22-2005, 04:25 AM
  5. Replies: 3
    Last Post: 10-28-2005, 03:05 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