+ Reply to Thread
Results 1 to 10 of 10

How to Check if exists value and return cell

  1. #1
    Registered User
    Join Date
    12-05-2011
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    46

    Question How to Check if exists value and return cell

    I have this problem... I have a worksheet that needs to be analised and then return the last date that has some kind of value

    .......A.................B.................C.................D.................E.....................F
    1/12/2011 | 2/12/2011 | 3/12/2011 | 4/12/2011 | 5/12/2011 | 6/12/2011 | ... ...
    .........................75%.............32%

    Has you can see cell A it's empty bellow the date, cell B has value and C has value, the other don't, but they will have when there is value for that day
    In this case the last cell with value it's C

    Let's say that in X cell I need to have a formula (that cannot be VBA) that I would have to return the date: 3/12/2011 because it's the last one that has value bellow.
    How can I do that? I was using ISBLANK... but got nowere.

    Can you help please?
    Last edited by virtualdark; 12-15-2011 at 07:22 AM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: How to Check if exists value and return cell

    Supposing your dates are in row1 and values in row 2, try
    Please Login or Register  to view this content.

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,447

    Re: How to Check if exists value and return cell

    Hi,

    This will return the value in row 1 adjacent to the rightmost cell in row 2 that is not blank

    =LOOKUP(2,1/(2:2<>""),1:1)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Registered User
    Join Date
    12-05-2011
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: How to Check if exists value and return cell

    Greetings... I have corrected the "design" :-) Cell A2 it's empty

  5. #5
    Registered User
    Join Date
    12-05-2011
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: How to Check if exists value and return cell

    My Excel it's having trouble accepting that 9.99999999999999E+307 !!! what am I doing wrong?

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: How to Check if exists value and return cell

    Maybe you need to use a comma after the first 9 instead of a dot ( regional settings)
    Otherwise Sweep's formula will also do

  7. #7
    Registered User
    Join Date
    12-05-2011
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: How to Check if exists value and return cell

    Ok... it was yhe comma... geeesh I'm slow today :-)

    I forgot to say something
    .......A.................B............C.................D.............E................ .F.....
    1/12/2011 | 2/12/2011 | 3/12/2011 | 4/12/2011 | 5/12/2011 | 6/12/2011 | ... ...
    .....................75%.............32%............................................10%....

    If I have a weekend I find no value and it jumps forward... so in this case the last one it's F with 10%
    I want to find the last one with value! Is there a way to find that value if there are more than, for ex: 5 empty cells?

  8. #8
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,447

    Re: How to Check if exists value and return cell

    Yes there is

    =LOOKUP(2,1/(2:2<>""),1:1)

  9. #9
    Registered User
    Join Date
    12-05-2011
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: How to Check if exists value and return cell

    You are absolutely correct SWEEP. Thank you :-)
    I was reverting the cells when adapting your formula and obtaining strange numbers :-)

    It's working has you told. Thank you

  10. #10
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: How to Check if exists value and return cell

    I want to find the last one with value!
    Both formula just do that

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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