+ Reply to Thread
Results 1 to 4 of 4

VBA - Show cell comments for a specific range of cells based on date, in a table format

  1. #1
    Registered User
    Join Date
    12-14-2016
    Location
    Aberdeen
    MS-Off Ver
    MS Office 2010
    Posts
    2

    VBA - Show cell comments for a specific range of cells based on date, in a table format

    I have two worksheets. One is the source worksheet, where all my data and comments are added, the other is a Report worksheet, which takes the necessary subset of data it needs (there are a few different report workbooks, all taking data, this data changes each week according to resourcing requirements). The Source worksheet has Names down the B column, and Dates across Row 4, with positions allocated in the table. Sometimes there are comments against those positions.

    I need to be able to look at a weeks worth of data, and take any comments against these cells to give a print out of them in table format. The table needs to have the format: Date, Name, Cell Value (aka resource position), Cell Comment. Not the typical 'Address' command as this is not helpful. The week in question is determined by the dates which are input at the top of the Report worksheet, these are entered as a formula (i.e =TODAY()+7-WEEKDAY(TODAY()+7-2) for the Monday and then every other day as a plus 1). I'm not sure if this will cause me issues.

    I'm (highly) inexperienced at VBAing and have come up with a (highly fail) code as below, with heaps of bugs (most likely) which I need help fixing up to return the above result. I've put in comments to try explain what I'm attempting to do with each row as it's probably not obvious.

    Any help would be appreciated, especially with explanations as to why as I really am trying to understand and learn it!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,910

    Re: VBA - Show cell comments for a specific range of cells based on date, in a table forma

    Honestly, it is often much better to describe what you have and what you want to do with it rather than say "here is code that does not work"

    What column (or row) has the dates that would determine if the cells should be included? What columns (or rows) have the cells with the values and comments of interest? How is the structute of your table?
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    12-14-2016
    Location
    Aberdeen
    MS-Off Ver
    MS Office 2010
    Posts
    2

    Re: VBA - Show cell comments for a specific range of cells based on date, in a table forma

    Apologies, I thought it would be better to attempt it first and had tried to explain what I was doing under each line of code.

    The row that specifies the dates to be included is Row 3 of the Active worksheet, from cells D3 to J3. The row with the dates which are being matched against is row 4 of the Source Worksheet (called Prod Planner).

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,910

    Re: VBA - Show cell comments for a specific range of cells based on date, in a table forma

    OK - but.... Where are the comments? what other values do you want? Say that the date from D3 is found in a cell in row 4 - what do you want to do then?

+ 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. Display comments in specific range of cells
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-29-2015, 09:05 PM
  2. Replies: 1
    Last Post: 11-25-2014, 08:35 PM
  3. Replies: 2
    Last Post: 09-26-2014, 09:01 PM
  4. Replies: 7
    Last Post: 05-03-2014, 12:17 PM
  5. [SOLVED] Count number of cells with a date format that have a specific age range
    By te31 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2013, 04:30 PM
  6. Formula to Show Accounting Month based on a specific date range
    By michelle saluta in forum Excel General
    Replies: 1
    Last Post: 09-23-2010, 02:17 PM
  7. Counting number of occurences specific date in range of cells in a table
    By jzzman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2009, 01:47 AM

Tags for this Thread

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