+ Reply to Thread
Results 1 to 6 of 6

Formula for updating a single cell from data entered into 12 other cells through the day

  1. #1
    Registered User
    Join Date
    06-16-2014
    Location
    Lancaster, New York
    MS-Off Ver
    MS Office
    Posts
    3

    Formula for updating a single cell from data entered into 12 other cells through the day

    I am working with 2 sheets within a workbook. Hourly a value is entered into a new cell on sheet number 1. There are 12 entrees made daily. I want a single value in a single cell on sheet 2, to be the lasted hourly value entered on sheet 1. In other words, the first hour value on sheet one would be posted to the single cell in sheet 2. As the next hours value is posted to sheet 1, the value in the cell in sheet 2, would be updated to the new value entered on sheet 1. I have tried different IF formulas without success. For example: IF(D12>0,D12,0,IF(D13>0,D13,D12,IF(D14>0,D14,D13,IF(D15>0,D15,0)))). What I think this says is: if cell D12 has a value greater than 0, enter value of D12 in the cell, if not, then enter 0; if cell D13 has a value greater than 0, enter value of D13 in the cell, otherwise enter value of D12 in the cell, etc. There is a range of 23 cells that data is input to, but I only need the last data entree on an hourly basis to be update to sheet 2 single cell. Is this possible??
    Summary: Sheet 1: Cells D12 through D23 start with a value of 0. After the 1st hour, a value is entered into cell D12. After the 2nd hour, a value is entered into cell D13. After the 3rd hour a value is entered into cell D14, and so on, until after the 12 hours, there is a data entree in each of the cells D12 through D23. Sheet 2: Cell C9 needs to be updated each hour with the new current entree to Sheet 1 cells D12 through D23. I have reviewed LOOKUP formulas, IF formulas, OR formulas, AND formulas, etc., and can not find anything that will accomplish what I need. Thanks for any help.

  2. #2
    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: Formula for updating a single cell from data entered into 12 other cells through the d

    Hi and welcome to the forum

    Try this....
    A
    B
    1
    1
    0
    2
    2
    3
    3
    4
    4
    5
    5
    6
    3
    7
    1
    8
    0


    B1=VLOOKUP(99^99,$A$1:$A$19,1,1)

    I did not use your ranges, so adjust them as needed
    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

  3. #3
    Registered User
    Join Date
    06-16-2014
    Location
    Lancaster, New York
    MS-Off Ver
    MS Office
    Posts
    3

    Re: Formula for updating a single cell from data entered into 12 other cells through the d

    fDibbins, Thank you, that works great. I understand most of the formula, but what is the 1,1 at the end? I initially thought it meant it would look to the 1st column to the left that had information in it. But that was not the case. Also if I had 0 in any of the locked fields, it returned 0, but if they were blank, it did not and returned the last value entered. I also played with the 1,1 by putting a 2 as the last, so that it was 1,2. It still returned the last value entered in the locked fields. Just wondering. Thanks again for the help!! Craig

  4. #4
    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: Formula for updating a single cell from data entered into 12 other cells through the d

    What that does, is search for a really really big number (99^99) - which it wont find. the 1,1 means look in the 1st column of the range (it only has 1 column anyway), and return the exact or next closest match.

    So, effectively, it goes all the way down to the last cell in the range, l;ooking for that big number. When doesnt find it, it works back up the range until it finds the very 1st value that is the next closest - it then stop looking.

    I tested with zero's and blanks inside that range, and it still gives me the very last entry. Below I have included 3 versions of the same thing, just changed the values inside the range

    A
    B
    C
    D
    E
    F
    G
    H
    1
    1
    5
    1
    10
    5
    2
    2
    2
    3
    3
    3
    4
    4
    4
    5
    0
    6
    7
    1
    50
    8
    5
    10
    5

  5. #5
    Registered User
    Join Date
    06-16-2014
    Location
    Lancaster, New York
    MS-Off Ver
    MS Office
    Posts
    3

    Re: Formula for updating a single cell from data entered into 12 other cells through the d

    FDibbins, Thank you again! Much appreciated! You explanation and exhibit was very helpful in my understanding of what the formula is doing. It is definitely easier than what I was attempting to do. Craig

  6. #6
    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: Formula for updating a single cell from data entered into 12 other cells through the d

    Happy to help and glad it worked for you. VLOOKUP can be a very useful tool to avoid lengthy/involved nested IF statements.

    It seems this answered your question. If so, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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. Write formula that examines last 10 data cells entered
    By dbogey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-26-2014, 02:28 PM
  2. Updating spreadsheet that makes a log of entered data
    By acwenger22 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-12-2013, 11:14 AM
  3. Replies: 3
    Last Post: 12-13-2012, 03:50 PM
  4. Increase formula by 1 row when original cell contents are not constant
    By Tulip1968 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-30-2012, 11:23 AM
  5. [SOLVED] FILL DATES IN VARIOUS CELLS BASED ON A DATE ENTERED IN A SINGLE C.
    By dencrowell in forum Excel General
    Replies: 2
    Last Post: 04-14-2005, 12:06 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