+ Reply to Thread
Results 1 to 3 of 3

Need help on macro formula

  1. #1
    Registered User
    Join Date
    03-10-2016
    Location
    Arizona
    MS-Off Ver
    Excel 2013
    Posts
    1

    Need help on macro formula

    Hi, need help figuring out a macro formula for a report that I have to create.

    The report takes an upload from another report with line items that are outstanding from a certain date and needs to determine how long they are outstanding and create column with the amount of days outstanding for each line entry.

    For example, a line item for Goods & Services is dated 03/01/2016 and the report is for 03/10/2016. I need this column to determine that this line item is outstanding for 9 days.

    So far this is what I got for my Days Outstanding Column.

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Please Login or Register  to view this content.
    This works currently as it calculates the difference between the date six columns before it with today, but I need to tweak the formula "=DAYS(TODAY(),RC[-6])" so that it reflects the days outstanding with the "report date" and not as of "today" as there is sometimes a 1 or 2 day difference. The date of the report is in cell A2 but it includes some wording in front of it, for example "As of 03/08/2016".

    My new formula I am trying is "=DAYS((MID,$A$2,7,10),RC[-6])" but it doesn't seem to work and gives me an error.

    Any ideas?

    Thanks
    Last edited by 6StringJazzer; 03-10-2016 at 05:21 PM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Need help on macro formula

    Hi and welcome to the forum.

    Not tested as you've provided no sample workbook, but try the below code and see if it does what you need.
    May need a little tinkering if my understanding of your workbook layout is off.

    Please Login or Register  to view this content.
    BSB

    PS. Please remember to use Code Tags, as per forum rules.

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Need help on macro formula

    Forgot to say, change "Sheet1" to the actual name of your sheet.

    BSB

+ 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. Problem with recording a macro with long formula - works in Excel but not in macro
    By tonybeo2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-28-2015, 11:25 AM
  2. Replies: 0
    Last Post: 02-25-2015, 04:16 PM
  3. VBA Macro: Plugging an Array-Formula into a Cell and Dragging Formula Down Columns
    By Brianandstewie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2013, 02:57 PM
  4. Macro: Applying formula to multiple cells in excel (formula editing)
    By city in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2012, 06:41 AM
  5. Formula/macro - Apply certain formula as per duplicate cells in column L
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2011, 12:28 AM
  6. Replies: 1
    Last Post: 07-20-2006, 03:05 PM

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