+ Reply to Thread
Results 1 to 6 of 6

Help: Auto applying a formula to new data when entered in to a specific column.

  1. #1
    Registered User
    Join Date
    10-02-2014
    Location
    United States
    MS-Off Ver
    2007
    Posts
    6

    Help: Auto applying a formula to new data when entered in to a specific column.

    I am new to the complex excel formula's but I have found a formula that is working very well for me but when I paste in new data to my sheet I have to use the drag option to fill the command down the column. I wouldn't generally care but I am pasting generally 300-400 items every 3 days. Here is the formula (=LEFT(SUBSTITUTE(SUBSTITUTE(D4,"-"," ",3),".",":"),16)*1). The D4 is the column to the left and E is the column that formula is actually in. It changes as you drag down (D5, D6, etc) and it converts date's in this format (2014/11/21 08:47 EST) to this (11/21/2014) so that excel reads it as a date and then can be sorted as such in column E. so every time I paste new data in it will have (2014/11/21 08:47 EST) in column D and I would like excel to auto use the formula, when the paste occurs,(=LEFT(SUBSTITUTE(SUBSTITUTE(XX"-"," ",3),".",":"),16)*1) in column E. Any and all help is much appreciated. (example layout below)

    D E
    2014/11/21 07:21 EST 11/21/2014
    2014/11/21 07:21 EST 11/21/2014
    2014/11/21 07:21 EST 11/21/2014
    2014/11/22 12:27 EST 11/22/2014


    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Help: Auto applying a formula to new data when entered in to a specific column.

    Few options...

    You could make it a table and enter in the formula there that way when you add more data and the table wraps around it, it will apply the previous formula...
    You could also just double click the last formula on the Bottom right hand corner of the cell. it will auto drag it until it finds the end.
    Or, once pasted, jump to the bottom of your data by hitting CTRL+Down, and then click in cell where the last formula will end, hit CTRL+Up then hit CTRL+D. This will duplicate previously applied information (Values,Formats,Formulas)
    -If you think you are done, Start over - ELeGault

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Help: Auto applying a formula to new data when entered in to a specific column.

    This will do the same thing, but is a bit shorter...
    =DATEVALUE(LEFT(D4,10))

    The table idea is a good 1, and is probably the better way to go.

    However, you you really want to just use your formulas, you could use this, copied wayyyy past where your data ends...
    =IF(D5="","",DATEVALUE(LEFT(D5,10)))

    If there is nothing in D, it wont show anything, when data is pasted into D, the formula will calc and show
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    10-02-2014
    Location
    United States
    MS-Off Ver
    2007
    Posts
    6

    Re: Help: Auto applying a formula to new data when entered in to a specific column.

    Thanks! I was totally unaware that I could double-click the corner. I have always been taught to drag it. Much appreciated.

  5. #5
    Registered User
    Join Date
    10-02-2014
    Location
    United States
    MS-Off Ver
    2007
    Posts
    6

    Re: Help: Auto applying a formula to new data when entered in to a specific column.

    I will try the table idea too.

  6. #6
    Registered User
    Join Date
    10-02-2014
    Location
    United States
    MS-Off Ver
    2007
    Posts
    6

    Re: Help: Auto applying a formula to new data when entered in to a specific column.

    Quote Originally Posted by FDibbins View Post
    This will do the same thing, but is a bit shorter...
    =DATEVALUE(LEFT(D4,10))

    The table idea is a good 1, and is probably the better way to go.

    However, you you really want to just use your formulas, you could use this, copied wayyyy past where your data ends...
    =IF(D5="","",DATEVALUE(LEFT(D5,10)))

    If there is nothing in D, it wont show anything, when data is pasted into D, the formula will calc and show

    So thanks to the above DATEVALUE here's what I was able to come up with, I decided to keep the time as well and now have a formula that will show both the date and time extracted from the cell.

    =(DATEVALUE(LEFT(D1,10)))+(TIMEVALUE(MID(D1,12,5))) will return 11/14/14 13:37. Then I just double-click the corner and the formula applies all the way down. As long as the cell is set correctly when formatting (date> 3/14/01 13:30) it works flawlessly. Thanks again!

+ 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] Applying a formula to a large specific amount of cells in a column
    By alcorp in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-03-2014, 05:30 PM
  2. Replies: 7
    Last Post: 06-22-2014, 03:33 AM
  3. Need formula to count how many times a specific name is entered in a column
    By JoeBlakkk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-04-2012, 01:36 PM
  4. Replies: 1
    Last Post: 09-10-2012, 04:04 AM
  5. auto fill time based on a when a specific cell has data entered
    By b16dlg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-30-2012, 05:26 AM

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