+ Reply to Thread
Results 1 to 6 of 6

Selecting specific range of cells based on current month

  1. #1
    Registered User
    Join Date
    06-19-2014
    Location
    Canada
    MS-Off Ver
    Office 2010
    Posts
    13

    Selecting specific range of cells based on current month

    Hello,

    I am currently trying to automate a process at work.

    In the workbook attached, under the column labelled YTD (Cell O4), I have to update the formula to include the current month (July), this process is repeated each month.

    I am wondering if there is a way to automate the process through a macro so that Excel knows that it needs to pull the sum of Cells B:H if it's month of July. Cells B:I if its the month of August etc. etc.

    Please let me know if you need additional clarification. Thanks in advance for your help.

    Sohshak
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Selecting specific range of cells based on current month

    Hi, welcome to the forum

    If you use real dates in your headings...1/1/2016, 2/1/2016 etc instead of month names (you can format the headings to just show months if needed) then you could use this regular formula, copied down...
    =SUMIF($B$2:$M$2,"<="&TODAY(),B5:M5)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-19-2014
    Location
    Canada
    MS-Off Ver
    Office 2010
    Posts
    13

    Re: Selecting specific range of cells based on current month

    Wow! That formula works wonders!!!

    Thank you so much!!


    Follow up Question:

    I use these numbers to generate a waterfall graph. The process goes that I will copy these numbers into a table (Cell Q6), divide by a thousand, and link them to an excel graph.

    This process is repeated each month for Current Month (CM) Year to Date(YTD) and Total Year Outlook (TYO) numbers.

    Is there a way for excel to "detect" that this month is the month of July and "pick up" the variance numbers from July in column U.

    I hope the attached spreadsheet further clarifies my request.

    Please let me know if you need additional clarification.

    Sohshak
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Selecting specific range of cells based on current month

    I am trying to ID how you know which row you want, for each item. Getting the column is pretty simple, provided we know how to ID which row

  5. #5
    Registered User
    Join Date
    06-19-2014
    Location
    Canada
    MS-Off Ver
    Office 2010
    Posts
    13

    Re: Selecting specific range of cells based on current month

    I want to pick up rows 33 to 42 under the Variance table.

  6. #6
    Registered User
    Join Date
    06-19-2014
    Location
    Canada
    MS-Off Ver
    Office 2010
    Posts
    13

    Re: Selecting specific range of cells based on current month

    I am sorry, did that answer your question?

    Do you need additional clarification?

+ 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. selecting model number based on specific range
    By sh_gh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2014, 04:27 PM
  2. Selecting Month >= Month in Current Cell
    By BLS99covert in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2014, 04:53 PM
  3. [SOLVED] Pick a cell containing current month actulas based what the current month is.
    By vanbasten007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2014, 01:17 AM
  4. [SOLVED] Sum cells based on current Month
    By nicko54 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-05-2013, 10:22 PM
  5. [SOLVED] Auto populate cells from data in a 6 month range starting with the current month
    By ecarnley349 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2012, 07:32 PM
  6. [SOLVED] Selecting cells based on Month and Day of the Week
    By ResidentKen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2012, 06:35 PM
  7. Count specific dates in cell range for current month
    By rboggio1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-22-2009, 10:21 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