+ Reply to Thread
Results 1 to 5 of 5

need vba to fill formula and input box value into formula overwrite date

  1. #1
    Forum Contributor
    Join Date
    02-28-2016
    Location
    australia
    MS-Off Ver
    2019
    Posts
    194

    need vba to fill formula and input box value into formula overwrite date

    Dear expert

    I have formula U:Z i want vba code to run and fill the formula one by one U,V,W,X,Y, When come to Z it has ask Inputbox to enter datevalue, once enter the date, it has to take value of DATEVALUE("mm/dd/yyyy")
    if i give 05/31/2015 then this formula has to fill =IF(OR(S2>=DATEVALUE("05/31/2015"),S2=0),G2,"Over Period")
    if i give 06/30/2015 then this formula has to fill =IF(OR(S2>=DATEVALUE("06/30/2015"),S2=0),G2,"Over Period")

    formula is in sheet afterrunvba

    please find the attachment
    Attached Files Attached Files
    Last edited by johnmacpro; 07-14-2016 at 03:23 AM. Reason: explain

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: need vba to fill formula and input box value into formula overwrite date

    There's a reference error in the formula in column V. What should this formula actually be?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    02-28-2016
    Location
    australia
    MS-Off Ver
    2019
    Posts
    194

    Re: need vba to fill formula and input box value into formula overwrite date

    Sorry sir This is acutal formula =IFERROR(IF(H2="ZSP1",AC2,IF(H2="ZLAB",AD2,IF(H2="LABOR & PART",AC2,IF(AND(H2="LABOR ONLY",G2=""),AD2,TODAY()-S2))))," ")

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: need vba to fill formula and input box value into formula overwrite date

    Okay - try this:
    Please Login or Register  to view this content.
    I've cleaned up a couple of your formulas, to use a more efficient LOOKUP instead of so many duplicated nested IF functions.

  5. #5
    Forum Contributor
    Join Date
    02-28-2016
    Location
    australia
    MS-Off Ver
    2019
    Posts
    194

    Re: need vba to fill formula and input box value into formula overwrite date

    Solved Sir Amazing Tricks of code

+ 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. [SOLVED] Formula to fill month end dates from start date to end date
    By Barieq in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-03-2016, 11:51 AM
  2. [SOLVED] Add 1 to Date - Formula Fill Down
    By ksayet in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2015, 01:17 PM
  3. How to input date range for SUMIF formula?
    By Viero7 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-24-2014, 04:57 PM
  4. Date Input through to Date Range Formula for other cells
    By Lewis333 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-02-2013, 11:42 AM
  5. Due Date: Automatic Input using formula or function
    By DianaEve in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-15-2013, 02:22 PM
  6. A1=Input B1=Formula Is there anyway to return the results to overwrite A1?
    By nayers1981 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2013, 11:38 PM
  7. VBA code to overwrite formula w/out deleting formula.....
    By nattielou in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2010, 09:21 AM

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