+ Reply to Thread
Results 1 to 3 of 3

Use value from Named Range in Comment?

  1. #1
    Registered User
    Join Date
    08-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2016, 32-bit
    Posts
    92

    Use value from Named Range in Comment?

    Is this possible?

    I actually have a comment that's currently in a cell (the actual text of the comment is a cell value at the moment), but I would like to use it as a comment for multiple cells. I saw somewhere that you can't do it without vba unless you use a named range. So, I named the range "SourceData_Hrs" but can't figure out how to format the comment so that the text of that cell shows up as the comment rather than the name of the range.

    I hope that makes sense. My intern was capturing the source data of each wkst in a cell to the right of the data. Well, you can't see that when you first open the worksheet, so unless you know to look there for it, you could be staring at the wkst wondering where this all came from.

    I tried "SourceData_Hrs", @SourceData_Hrs, @[SourceData_Hrs], "[@SourceData_Hrs]", =SourceData_Hrs, and =@SourceData_Hrs

    Not sure what to try next.

    TIA!

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Use value from Named Range in Comment?

    Using a named range in a comment just means that the comment will still be valid if you insert/delete rows/columns/cells - that is, if you have a comment 'This is the sum of B13 and C13', it would need to be updated if you insert a row/column, but 'This is the sum of Sales_Jan and Sales_Feb' wouldn't.

    Without VBA there isn't a way to insert information into a comment automatically.

    Is there a reason you can't put a helper column beside the cells containing the information instead of a comment?
    If you don't want to do that and there is a formula in the cell, you could use the 'N' function to add information which would be visible in the formula bar - but it wouldn't appear on the sheet itself.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ↑ This works because N returns 0 (zero) if given a text string, so adding it at the end doesn't affect the rest of the formula (B2+AC2 in this case), but is visible to anyone using the file if they click on the cell.

    I don't know if that's of any help?
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    08-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2016, 32-bit
    Posts
    92

    Re: Use value from Named Range in Comment?

    Thanks for replying!
    I think I understand now about the named ranges.

    Yes, I basically want to add a comment to every column in the spreadsheet so that I (and everyone else on the team) will know where that data came from. The cells I want to use the comments in have text in them, not a formula. I wonder if I could do something like
    =N("text that's currently in the cell")+N(comment)?

    I'll give it a try.

    I'm comfortable with VBA, but didn't want everyone who has to open it to deal with enabling macros, etc.But maybe I can just run the macro and then save it as a non-macro file.

+ 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. [SOLVED] Assign named range to one cell depending on named range in another
    By x65140 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2015, 11:04 AM
  3. [SOLVED] determining if cell is part of named range and what that named range is
    By stnkynts in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2014, 07:56 PM
  4. Adding row to a named range-updating the named range address
    By kjsconv in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-12-2013, 11:22 PM
  5. Replies: 1
    Last Post: 02-27-2013, 12:00 AM
  6. open a comment to cell range upon true condition then removing comment on false condition
    By ferrum_equitis in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2012, 12:55 AM
  7. [SOLVED] Determine what Named Range the Target Address is and return Named Range Name
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2012, 10:49 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