Results 1 to 3 of 3

Need help on macro formula

Threaded View

  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
    Range("J3").Select
        ActiveCell.FormulaR1C1 = "Days Outstanding"
        Range("J4").Select
        ActiveCell.FormulaR1C1 = "=DAYS(TODAY(),RC[-6])"
        ActiveCell.Copy
        Range(Selection, Selection.End(xlDown)).Select
        ActiveSheet.Paste
        Selection.Copy
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
        Application.CutCopyMode = False
    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.

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