+ Reply to Thread
Results 1 to 7 of 7

Balance of Year Macro?

  1. #1
    Registered User
    Join Date
    08-21-2007
    Posts
    17

    Balance of Year Macro?

    I am looking for some help writing a macro to use different formulas depending on the month. I am trying to get it to do a balance of year total and then for it to help me get a balance of year price. (Aug -Dec, or if it is July then July-Dec). I have attached a sample of what I'm working with. Any help is greatly appreciated! Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why do you need a macro? You can use Functions
    Attached Files Attached Files
    Last edited by royUK; 08-23-2007 at 04:38 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-21-2007
    Posts
    17

    Thank you

    Thank you very much. This will work, and its much easier than a macro. Thank you again.

  4. #4
    Registered User
    Join Date
    08-21-2007
    Posts
    17
    =SUM(OFFSET(A2,0,0,1,MONTH(NOW()) + IF(MONTH(NOW())>3,-3,3)))

    I gave that a try... I'm not sure it will work. Is this something I can pick the month on? The spreadsheet I'm working with is something that I will want to use to look at options coming up. If it is now August I might want to look at options for October balance of the year...
    I appreciate any help, Thank you!

  5. #5
    Valued Forum Contributor
    Join Date
    04-11-2006
    Posts
    407
    replace "now()" with a cell (example: "A1") then type the date you want to look for in cell A1... the MONTH function will determine the month of the date that you enter. YEAR and DAY functions do the same thing, returning the year and the day, respectively.

    Hope that helps.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    One of the formulas in the original example was missing. I have replace the attachment with an amended example & added a demo of what ikaabod was suggesting.

  7. #7
    Registered User
    Join Date
    08-21-2007
    Posts
    17
    Thats great! Thank you very much for all of the help you have given me!

+ 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