Excel Magic Trick 977: Lookup First Non Empty Cell In A Range, Lookup Last Number In A Range

Поделиться
HTML-код
  • Опубликовано: 5 окт 2024
  • Download Excel Start File: people.highlin...
    Download Excel File: people.highline...
    Two Formulas for Lookup First Non Empty Cell:
    1. {=INDEX(E2:L2,MATCH(TRUE,E2:L2 not "",0))}
    2. {=INDEX(E2:L2,MATCH(FALSE,ISBLANK(E2:L2),0))}
    Formula to lookup last number:
    3. =LOOKUP(9.99E+307,E2:L2)
    Busn 214 Joyce April Method

Комментарии • 57

  • @excelisfun
    @excelisfun  12 лет назад +1

    Yes, the current class really rocks and it is soooo much fun to hang out "live" in a room full of Excelers.

  • @krn14242
    @krn14242 12 лет назад +1

    Great job Mike. Smart class you have. Kudos to Joyce and April.

  • @excelisfun
    @excelisfun  12 лет назад

    Yes, that will work! If you had a large spreadsheet and calculation time was a factor, using a hard coded number would help to calculate faster.

  • @avijitnov
    @avijitnov 3 года назад +1

    You saved my day!!

  • @hugostein8092
    @hugostein8092 3 года назад

    Thx man you saved my day,.... Actually you saved my entire investment analysis project

  • @ExcelStrategy
    @ExcelStrategy 12 лет назад

    After some tests I think that the most elegant one is to obtain the array using the "index" with the "Isblank" and the "zero column" trick, then convert the bounch of true and false in a bounch of one and zeros putting the "double negative" in front of it, then match the position of the first zero inside this array using "zero" for the argument of the "match", and that shuld give to the external "index" the position of the first "non empty" cell ! Hope my description is understandable :)))))

  • @nanoak85
    @nanoak85 5 лет назад +2

    Very useful post, Mike. What if we want to show first the non-blankcell, and later the second non-blank value, and the third one...? Like deleting the empty lines...I think about a conditional function, where the array changes with the location of the previous found value. For example, if your first value is found in row 4, the next array will go from 5 to 10 and not from 1 to 10. I would appreciate some help. Thanks

  • @katerina6495
    @katerina6495 5 лет назад

    Fantastic Mike, fantastic, this trick is amazing, you always say more in your videos

    • @excelisfun
      @excelisfun  5 лет назад

      Glad it is fantastic! Thanks for your amazing support : )

  • @excelisfun
    @excelisfun  12 лет назад

    MAX is not bad; in fact it is a common cool trick!

  • @mohabhamad5094
    @mohabhamad5094 7 лет назад +1

    actually I need to get the header of last filled cell whether txt or nos , same example you have mentioned I need to get day # for the last filled cell dynamically , so always get the day number whenever coping the formula down.

  • @Jaba01
    @Jaba01 12 лет назад

    You are right! I didn't pay attention about the computational time. My bad :) I totally agree with you.
    Thx for the explanation and congrats for the great work!

  • @querrythis
    @querrythis Год назад

    Very helpful.
    Although syntax is fine, for me the ISBLANK is more explicit.

  • @SaiGuy_
    @SaiGuy_ Год назад +1

    Thank you for the carry

  • @AnnHsu-md5pl
    @AnnHsu-md5pl 5 месяцев назад

    That's excellent tips. I have a scenario where I need to look up the header info (in your example above = Day 1 or Day 3). How can I do that?

  • @excelisfun
    @excelisfun  12 лет назад

    I am not sure that I follow. Why do you have to convert to 1s and 0s?

  • @excelisfun
    @excelisfun  12 лет назад

    Fun is good!!

  • @williamamankwah6667
    @williamamankwah6667 8 лет назад +1

    Nice one. But please what about if you want to find a last but one non zero cell in a range of a column? How can I go about it? last but one non-zero cell. please help me.

  • @pankajkumaram
    @pankajkumaram 7 лет назад

    Thank you so much Sir.

  • @pranoysingha3236
    @pranoysingha3236 4 года назад

    This is really useful. Using this, we can find the first cell location containing data, but is there any way to find the last cell location containing data?

  • @excelisfun
    @excelisfun  12 лет назад

    Cool! That is a great idea!!
    If you download the Excel workbook or look in the video I have placed such a formula in cell E8 and wrote "No CSE" next to it.
    Do you have a preference about which you like better:
    1) FALSE and ISBLANK
    2) TRUE and E2:L2 not ""

  • @excelisfun
    @excelisfun  12 лет назад +1

    Why do you need to convert the TRUEs and FALSEs to 1s and 0s? Can't you just skip that and use a lookup value of TRUE or FALSE? Like:
    =INDEX(range,MATCH(FALSE,INDEX(ISBLANK(range),),0))

  • @dimitriospapapavlou9539
    @dimitriospapapavlou9539 4 года назад

    This is great, but what if you need to search in specific columns ? Only in Day 1, Day 4, Day 6 etc. ? A reply would be super appreciated. I only need it to search in specific columns, not the whole line

  • @ExcelStrategy
    @ExcelStrategy 12 лет назад

    Becouse i think that this "MATCH(0;INDEX(--ISBLANK("range");1;0);0)" version of the formula it is very elegant :))). In one of my experiment I have subtracted the "Isblank" from 1, converting every "True" to "zero" and every "false" to "one", and in that case it is possible to use "1" for the argument of the match, but at the end i think the double negative its mouch more elegant :))).

  • @ExcelStrategy
    @ExcelStrategy 12 лет назад

    Hello Mike, maybe it is possible to avoid the CTRL+SHIFT combination putting the "isblank" inside an "index" function with the row number set on 1 and column number set on zero, it should retourn an array inside the match without CTRL+SHIFT .

  • @abhinavkadam8579
    @abhinavkadam8579 3 года назад

    Hi Mike,
    How can be formula further be extended to pick header of first filled cell??

  • @timjacobs2487
    @timjacobs2487 2 года назад

    There HAS to be a way to do this... for monthly reports, what is the code to make excel stop counting at the first blank cell?
    Ex., column C for August has 90 entries, how do I make Excel automatically stop at 91? I have to do this manually for like each month and a ton of columns

  • @matthewhopkins475
    @matthewhopkins475 5 лет назад

    Going one step further, how do you think this could be used to copy data from a master entry sheet into a dynamic sub table, matching a criteria, into the first available blank cell? Currently stuck on this problem myself and it's been a real pain trying to figure it out!!!

  • @excelisfun
    @excelisfun  11 лет назад

    Sure, post a video response.

  • @RobertoRomeroJr
    @RobertoRomeroJr Год назад

    Hi. How can I extract data for the next non-zero and non-blank cell after the first value? I hope I can be helped on this one. Thank you!

  • @Adin7785
    @Adin7785 6 лет назад

    Awesome! Thank you!!

  • @hsab5927
    @hsab5927 3 года назад

    awesome thanks

  • @startsmall9500
    @startsmall9500 7 лет назад

    Good Job :) Thank You!

  • @paulbaird1351
    @paulbaird1351 5 лет назад

    Is it possible to get the arrange to look from right to left? Or more specifically for my need to look from down to up if using in a column?

  • @stephenbrincat7124
    @stephenbrincat7124 5 лет назад

    Hi, Mike, what if I have text instead of numbers and would need to get the first cell which contains text?

  • @katwilat
    @katwilat 6 лет назад

    Great, thanks a lot!

  • @mcrams1
    @mcrams1 11 лет назад

    Mike,
    Is it possible to submit questions for solutions or projects as a video?
    Thanks.

  • @Jaba01
    @Jaba01 12 лет назад

    Instead of 9.99E+307 I would have used MAX(E2:L2)+1. So you don't need to know the biggest number in Excel and still be sure to use a big enough number. This should work also, right?

  • @YY7788JJ
    @YY7788JJ 8 лет назад

    How can I go back to the last cell position using an already established shortcut or by making a new one in Mac Excel 2011

  • @manishjain4540
    @manishjain4540 Год назад

    thanx alot

  • @Movie_mania786
    @Movie_mania786 3 года назад

    Why we will use 9.99E+307 in lookup value

  • @youneskh8771
    @youneskh8771 4 года назад

    Hollo,
    Plz what if I want to find the second or third value. Cause I have a customer's which they have different repurchase so I need to figure out first sales /second /third ...)

  • @MKapitan
    @MKapitan 5 лет назад

    Thanks

  • @franciscojrlarita441
    @franciscojrlarita441 3 года назад

    what if the data range have subtotal, how to exclude so that I can get the last number

  • @sourabh5461
    @sourabh5461 5 лет назад

    Good video, but I Want Date 1, Date 2 etc. Instead of Numbers..Please reply..

  • @snehamohite2358
    @snehamohite2358 Год назад

    How to fetch the last non 0 value?

  • @zemlyaru1977
    @zemlyaru1977 3 года назад

    What if the last 2 or 3 values are duplicates?

  • @kazimshaikh3891
    @kazimshaikh3891 5 лет назад

    Is it possible to lookup an alpha numeric value

  • @welovespeadsheet
    @welovespeadsheet 5 лет назад

    Sir, in row no 5, if i want second no i.e 12.5 than how can i do?

  • @hzaphry
    @hzaphry 4 года назад

    Ctrl+Shift+Enter that's what was missing, I had the logic many times but never worked. Thanks man.
    Is there anyway to return values other than the first non-blank?

    • @excelisfun
      @excelisfun  4 года назад

      I am sure there is. What is the logic of what the other is?

    • @hzaphry
      @hzaphry 4 года назад

      ExcelIsFun second third or other. But I got it already using small function . Thanks so much

    • @excelisfun
      @excelisfun  4 года назад

      @@hzaphry Cool : )

  • @mohabhamad5094
    @mohabhamad5094 7 лет назад

    how to do the same for text entries?

  • @ExcelStrategy
    @ExcelStrategy 12 лет назад

    Becouse it is fun :))))

  • @welovespeadsheet
    @welovespeadsheet 5 лет назад

    Please help sir.