+ Reply to Thread
Results 1 to 3 of 3

Code for range shifting based on month

  1. #1
    Registered User
    Join Date
    07-18-2011
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    31

    Code for range shifting based on month

    Dear all,

    I have a spreadsheet containing daily customer transaction data. I have used SUMIF to find out the monthly customer transaction data.
    However, it is tedious to copy the formula and paste for next month when next month comes.

    Can anyone suggest any VBA code / idea to help shifting the formula?

    Please find the attachment.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: Code for range shifting based on month

    Where will the data be stored for the next month? For April, the range is rows 104 to 548. What about May?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Code for range shifting based on month

    Hi

    If i understand well your request, then maybe you do not need a macro and you can use SUMPRODUCT and MONTH(your range).

    You also,need to format column A as date.

    Take a look to the example ant us know if it's OK, for you.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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