Consulting

Results 1 to 16 of 16

Thread: Solved: To reflect latest data updated in a row range

  1. #1

    Solved: To reflect latest data updated in a row range

    Hi,

    I've updating the daily temperature data in R1C1, R1C2, R1C3...

    In cell B1 (latest temp), i want to reflect the latest temp updated in the above range (R1C1, R1C2, R1C3...).

    Is there any formula to get this done?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Isn't B1 and R1C2 the same cell?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Sorry. It should be B2

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    When you say latest in row 1, do you mean the max? Otjerwise, how do we know when it isa latest?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    It's not max value.
    Above the first row, the row headers will have dates from 01st Jul to 31st Jul. Day wise temp will be entered below each dates (shown in R1C1, R1C2...)

    On 01st July, the value entered in R1C1 should reflect in B2. On 02nd July, the value entered in R1C2 should reflect in B2. So by looking at B2, the user will come to know the latest temp.

    This excel will be used to capture 1 year temperature data and hence the requirement.

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I am getting confused by what is in each row, you seem to be saying the values are in row 2 now. Best if you post a sample workbook.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    If the layout is:
    In Row 1 : Dates are written
    In Row 2 : Corressponding temperature for date is written then
    In Cell C1: formula below will work
    =INDIRECT(ADDRESS(2,MATCH(TODAY(),1:1,0)))
    And on second thoughts, I forgot that fairly simpler HLOOKUP will also work:
    =HLOOKUP(TODAY(),1:2,2,0)
    Last edited by shrivallabha; 07-02-2011 at 01:05 AM.
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

  8. #8

    To reflect latest data updated in a row range

    It picks up the data as of current day but at most of the times we get yesterday's or day before yesterday's data on the current day.

    I've attached a sample file and provided examples on my requirement.

    --thanks
    Attached Files Attached Files

  9. #9

    To reflect latest data updated in a row range

    Attached a sample workbook in latest post. Thanks

  10. #10
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    The following formula can do it:
    Quote Originally Posted by FORMULA
    =OFFSET($A2,0,COUNT($B2:$AF2))
    I am attaching the workbook. Have a look in the green, thick bordered cells where the formula is inserted.
    Attached Files Attached Files
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

  11. #11

    Changed the result cell in to the same row of the data

    Hi,

    I tried to place the result (latest temp data) in the same row of the temp data and used the formula with changes in row reference but didn't show the latest data.

    What has to be changed in the formula? PFA.
    Attached Files Attached Files

  12. #12
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    Paste the following formula in cell B2:
    =IFERROR(OFFSET($C1,1,COUNT($C2:$AG2)-1),"")
    Please note: IFERROR is added to handle the case of circular reference.
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

  13. #13
    Works fine but the same formula doesn't work in another worksheet having similar data. In the attached file, row 35 is like the temp data in the previous example.

    Cell B35 has to reflect the latest % updated in the same row. Using the given formula, it returns value of 0%
    Attached Files Attached Files

  14. #14
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    If this is the actual data where you wanted to implement formula then why not post it at the first place as:
    1. There are merged cells so the COUNT will land up at the wrong place.
    2. Cell H35 is merged and blank and your posted sample showed continuous data.
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

  15. #15
    The solution for the first one was was very helpful. We received this data set a day before and wanted to try it on my own but couldn't.
    Sorry for it.
    Is there any solution for this?

  16. #16
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    The problem with my formula in general is that they tend to be local i.e. case specific. Following ARRAY formula will work if:
    1. The cell where you apply formula is not merged. The rest you may keep as they are!
    2. You enter the formula using CTRL+SHIFT+ENTER. Correct entry will show braces {} around the formula.
    =INDIRECT(ADDRESS(ROW(),LARGE(IF(E35:BO35<>"",COLUMN(E35:BO35)),1)))
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •