Google Sheets - Get Last Non-Empty Cell in Row or Column

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • Learn how to get the last non-empty cell in row or column. In this tutorial we'll first create a formula to get the row number for last non-empty cell and then get the data value in the the cell.
    #googlesheets #lastrow #lastcolumn

КОМЕНТАРІ • 186

  • @sharkattack6423
    @sharkattack6423 3 роки тому +6

    UA-cam is amazing. I just picked my car apart and put it back together. Now Im learning excel whoop whoop!

  • @rbcrist
    @rbcrist 2 роки тому +9

    Hello. I was watching your videos for the last 3 days and i can tell you the way you explain is perfect. I am SAP consultant with ABAP development skills but i wanted to do something for me with google sheets and java script in which i never worked before ( only excel formulas ). Based on your videos i was able to write my own little program to track some consumptions in the house, etc...by passing values to google sheets and getting values from google sheets in java script. Great teacher !

  • @mrsamot4677
    @mrsamot4677 11 місяців тому

    Was poking around on the internet looking for a solution to this. Most of them were convoluted for no reason. This was straight to the point! Thanks for the great tutorial!

  • @minhthai2804
    @minhthai2804 3 роки тому +3

    OMG, your channel basically covers all the functions needed for all situation !!

  • @malikastar9265
    @malikastar9265 Рік тому +3

    As always, you make it easy with no boring explanations, thank you, I'm glad I've found your channel !

  • @cric8482
    @cric8482 3 роки тому +2

    Nice idea. It works too for a range : =max(arrayformula(ROW(A1:H)*(--(A1:H"")))) Very cool when used with indirect function

  • @infact5376
    @infact5376 4 роки тому +5

    Great way of explaining! You are a born teacher! Thanks form the bottom
    of my heart!

  • @mateushorta9764
    @mateushorta9764 Рік тому

    Thank you so much! I've been struggling so hard to do this for a long time.
    What a sophisticated solution to multiply by 0 if the column is empty.

  • @JanTuts
    @JanTuts 3 роки тому +9

    Me: "Why can't I figure this out, how hard can it be? It's probably a simple function like _SUM()_, that I just don't know about."
    Tutorial: 16 minutes long
    Me: "oh boy..."

  • @walterpaiva719
    @walterpaiva719 4 роки тому +5

    Your way of teaching is really cool and intuitive. As always, really good video!

    • @izaakeberst5816
      @izaakeberst5816 4 роки тому

      Yes! Not just "paste this code" but building the formulas. Then I can tell how my code will be similar/different.

  • @FreeAltSoftwareTutorials
    @FreeAltSoftwareTutorials 2 роки тому +1

    best explanation ever....
    I was always afraid of spreadsheet formulas but you made it super easy and understandable for me!
    Thank you so much!

  • @manuelfpardo
    @manuelfpardo 3 роки тому +4

    This one has a problems if the formula is in the actual row analysed. =(INDEX(FILTER(H44:44;NOT(ISBLANK(H44:44)));COUNTA(H44:44)) This one solves the problem.

  • @enlightenedterrestrial
    @enlightenedterrestrial 3 роки тому +3

    Everything works right up until 12:08 with the new INDEX function. The cell simply remains empty!

  • @NSE_Foden
    @NSE_Foden 4 роки тому +2

    That is extremely useful. I have combined it with the indirect function to use with dynamic dropdown lists which is something I have been trying to do for a few weeks using information from another of your videos, but couldn’t get it to work.

  • @peterlaszlo9611
    @peterlaszlo9611 3 роки тому +1

    Thank you for taking you time to make a video about this. This is really helpful. God bless!

  • @SnowHunter44
    @SnowHunter44 3 роки тому +3

    Exactly what I needed, Thank you for this educational video!

  • @SaintHanappi
    @SaintHanappi 2 роки тому

    thanks god I found this helpfull tip about COUNTA, which I use now in an empty cell on top to get the number of rows in my App-script.
    I had a big problem with an ArrayFormula within the Data-range and had a ton of non-blank rows in my search-result.

  • @marciofleury
    @marciofleury 3 роки тому

    Great video. Thanks. Just to add that if you don't start form Column 1 or Array 1, you need to manually offset the value for MAX

  • @FIREinIndia
    @FIREinIndia 2 роки тому

    Thanks for this amazing video. Very easy to understand and great shortcuts shared as well

  • @philmustoe5438
    @philmustoe5438 4 роки тому +1

    Are you sure you're not David Copperfield! Great stuff, these videos are priceless, Thanks

  • @DanielSAraujo98
    @DanielSAraujo98 4 роки тому +3

    that was some genius move, really. thanks for that!!

  • @ruwanchamara3670
    @ruwanchamara3670 Рік тому

    superb video....i am learning from your videos.... very help for archive my automation tasks....from Sri Lanka

  • @CharlesOdulio
    @CharlesOdulio 2 місяці тому

    Hi! Im a data analyst here from the philippines, Im working with my data table which leads me to here (your video), Although, what im really looking for is: how can I add a text after the last value on my data (row) like for example: if the last value is at row 10, row 11 automatically shows "Grand total" or any text that would fit the data table. Thanks a lot for your help!

  • @michaelkahmann8028
    @michaelkahmann8028 4 роки тому +1

    Your videos are amazing. I have learned a lot. Thank you !

  • @adamagave
    @adamagave 7 місяців тому

    Great video, thank you for sharing this method!

  • @minigamekh1628
    @minigamekh1628 Рік тому

    If possible, I will give you a millions like bro. You solve my big problem with a small trick. 😍😘

  • @dmitryn9090
    @dmitryn9090 4 роки тому +3

    That's elegant! Thank you for sharing!

  • @cheewurz
    @cheewurz 4 роки тому +2

    Dude... You are one Smart Guy! How would you make Flash Cards that Auto Expand in Google Sheets?

  • @LXXIV
    @LXXIV 2 роки тому

    How can I get this to work in an array formula? To just fill out the entire column?

  • @shabbirsheik547
    @shabbirsheik547 4 роки тому +1

    Hi sir...
    New type of thing I have learned.
    Please make more videos on merge google sheets with google docs without add-on. For certification or pre-defined letter pads like structure.
    Thanks and regards
    Waiting for your response.

    • @richardmhain
      @richardmhain 4 роки тому

      Google docs Mail Merge w/o add-on available from his previous video:
      ua-cam.com/video/QNPPEB64QbI/v-deo.html
      Maybe we both want w/o add-on and no scripts too.
      Waiting for that too.
      Meanwhile, I guess pre-printed forms and a tab with query to display all necessary data should do the job.

  • @gnf2020
    @gnf2020 12 днів тому

    what if i just want to looking for value in range of row. For example i just want to look last value in range A11:Z11. Thanks before

  • @user-od2rt8iz3p
    @user-od2rt8iz3p Рік тому

    please let us know sum function in google query function, i mean to say that total showing in bottom like if ram sales repeat in 5times than not required group total of ram, we required total showing on both with each entry of ram ,

  • @diegomouratorres7094
    @diegomouratorres7094 3 роки тому +1

    That's fantastic! Very useful technique.

  • @arielzabatecuizon5147
    @arielzabatecuizon5147 2 роки тому +1

    Hi, thank you for this great video. My question is: Now that I have known the last row, how would I be able to concatenate or join them to make a simple range? For instance I have A1:A & maxrow. How can attach that number to the A1:A to make a range with the lastrow? I hope I am making sense. Please help.

  • @abhishekgulati1904
    @abhishekgulati1904 3 роки тому +2

    Showing REF# error..please help. And error says circular ref. Check spreadsheet settings

  • @cahyosantoso9506
    @cahyosantoso9506 3 роки тому +1

    This formula can also be used =ArrayFormula(MAX(IF(A:A="",,ROW(A1:A))))

  • @ZimaSanfilippo
    @ZimaSanfilippo 2 роки тому

    Great video, you explain everything well and in detail. However, in my case the result comes as an empty cell.
    I figured it is because my array starts from the third row in a column, and my result should be in the second row of the same column.
    Any way to fix this?

  • @RahulKumar93555
    @RahulKumar93555 2 місяці тому

    Very good videos Sir great 👍👍

  • @KopiPaste-zw1bb
    @KopiPaste-zw1bb 5 днів тому

    How can add a filter to this? like give me the last row for a specific fruit. Where abouts would i add the filter?

  • @getdavemoore
    @getdavemoore 4 роки тому +1

    beautifully explained as always - many thanks

  • @gesca964
    @gesca964 3 роки тому +1

    Thanks a lot, exactly what i was looking for !

  • @hoguemr
    @hoguemr 3 роки тому

    This is such a great video. Great method of explaining!

  • @nikosdalamagkas6478
    @nikosdalamagkas6478 11 місяців тому

    I need to use the row number he finds, in a cell. e.g. he find 8 as the row number. How i can use in another function C8 ?

  • @animationmoron
    @animationmoron 4 роки тому

    Fascinating way to tackle the problem. I've played with this formula a bit and it is quite handy. I am, however, curious if it is possible to adjust this formula to do the same, but instead return the second last item in the list?

  • @mojsterr
    @mojsterr 2 роки тому +1

    You are AWESOME. Thank you!

  • @Shoaibzahoor
    @Shoaibzahoor 4 роки тому

    A small help with a formula
    I normally use index and match function with sumproduct and it just work fine in excel. But don’t know why same is not working in google sheets
    I have two sheets . on sheet1 I have invoice numbers and on sheet2 I have cheque nos . I manually put invoice no against the cheque nos on sheet2.
    I added 3 columns on sheet1 : Col 1 to sum the amount of the cheques in hand. Col 2 to Count the no of cheques against each invoice. I easily displayed the correct values in Col 1 and Col2 using Sumproduct function.
    For Col3 as there could be many cheques against a single invoice. In col 3 I want to display the Cheque date for the very last Cheq for this Invoice.
    e.g Invoice no is 2565 and Cheque dates against this invoice are { 10-Jun-20, 15-Jun-20, 25-Jun-20}
    in Col3 I want to display 25-Jun-20
    I easily located the row number on sheet2 where cheque date “25-Jun-20” is by using formula
    =sumproduct(MAX(('CDC/PDC'!L:L=$B4)*ROW('CDC/PDC'!L:L)))
    Say the output of this formula is 330
    In excel if I use index function Index(rangA:A,[Row : I put 330], [col : I put 1])
    I can easily display the value i.e 25-Jun-20 in row 330 of range Sheet2!A:A
    But when I use below in google sheet it display value from all the rows from sheet2
    =index('CDC/PDC'!C3:C,sumproduct(MAX(('CDC/PDC'!L3:L=$B4)*ROW('CDC/PDC'!L3:L))),1)

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +2

      Since you changed your ranges to start from row 3, your ROW function will not match the position.
      This however should work.
      =index('CDC/PDC'!C:C,sumproduct(MAX(('CDC/PDC'!L:L=$B4)*ROW('CDC/PDC'!L:L))),1)

    • @Shoaibzahoor
      @Shoaibzahoor 4 роки тому +1

      @@ExcelGoogleSheets brilliant you are such a blessing :)

  • @Chris-cf2kp
    @Chris-cf2kp Рік тому

    Does this work if the rows you're trying to array index are outputs of another formula?

  • @fjose1857
    @fjose1857 3 роки тому +1

    Oh my. Thank you so much. This helps a lot 🙂

  • @SamanthaBryan2877
    @SamanthaBryan2877 4 місяці тому

    This works great BUT doesn't work when the blank cells have formulas inside. I have NOT been able to find anything that works in a blank range filled with formulas.

  • @YourOnlineMentor
    @YourOnlineMentor 2 роки тому

    thanks

  • @TheF22raptorang
    @TheF22raptorang 7 місяців тому

    love it
    thanks. Sir.
    I find it long time

  • @rachitm109
    @rachitm109 3 роки тому

    Another awesome video! thanks. you should open a patreon too. I wouldn't mind chipping in some beer money

    • @rachitm109
      @rachitm109 3 роки тому

      But please keep making. I'm loving learning from your videos

  • @papaduck3649
    @papaduck3649 3 роки тому

    i really like your video because you explain it broken down to dum bits. However I have a question, I don't want to disable the re-iterative calculation but if I inquire about the last filled row on column A in a cell located in column A, what to do with the circular dependency?

  • @elodielaurent14
    @elodielaurent14 Рік тому

    Thank you so much ! This is very well explained ! :D

  • @pallabsharma5374
    @pallabsharma5374 3 роки тому +1

    Superb!! highly appreciated

  • @jansmits5486
    @jansmits5486 2 роки тому

    Hi I love your Videos have learnt so much from them and been able to do so much but i do have 1 question. Is there a way to use this formula to get the last known number from spasific date? I work with a group from germany and we get funds in euros but convert them to IDR when they arrive. The currency exchange rate changes a lot and quite drasticly over the years. I want to be able to get the euro prices for all expensise we have made. To do so correctly i wanna use the date of the expense to find the last time we converted euro to IDR to get the exchange rate. Hope u can help me

  • @ebighebirowland
    @ebighebirowland Рік тому

    PLEASE, MY SHEET DID NOT RETURN THAT RESULT "GRAPES" @ THE TIME STAMP: 12:29 ; WHAT COULD BE THE REASON? I ENSURED THE FORMAT WAS ON "AUTOMATIC"

  • @jefbracke5567
    @jefbracke5567 2 роки тому

    You have amazing explaining skills, thank you so so very much for your video!!!!!

  • @jonjonjonjon9340
    @jonjonjonjon9340 3 роки тому

    You’re the best!! Thank you for sharing this!

  • @raccoonair
    @raccoonair 3 роки тому +1

    Excellent, thank you!

  • @jaynguyen1573
    @jaynguyen1573 3 роки тому

    The tutorial was very clear and well done, but can someone explain what this formula is typically used for in a real world situation?

    • @mojsterr
      @mojsterr 2 роки тому

      I have a trading journal where I populate each new cell with a win or a loss in EUR. I have another cell "Current Balance" which only needs to check the last populated cell and take the last value - the new balance on my account.

  • @cric8482
    @cric8482 3 роки тому +1

    And another one : The last row containing data for a sheet named "test" : =max(arrayformula(ROW(indirect("test!1:" & ROWS(test!A:A)))*(--(indirect("test!1:" & ROWS(test!A:A))""))))

  • @magiaoscar
    @magiaoscar 3 роки тому

    Good explication, thank you so much

  • @bharatmaa2351
    @bharatmaa2351 2 роки тому

    Thank you very much.

  • @Adil-tb8xo
    @Adil-tb8xo 2 роки тому

    Hello good sir,
    I have a question - suppose you want to make a list of all the fruits after banana and the list is not uniform i.e. sometimes banana might be every other row, sometimes there are blank rows, sometimes the word banana might come up 3 rows later etc. Is there a reliable way to solve this problem?
    Many thanks

  • @rrilho
    @rrilho 3 роки тому +1

    Your videos are amazing!

  • @MichaelDaniels
    @MichaelDaniels 4 роки тому

    This is a fantastic job. Love your videos

  • @sathianarayanan6550
    @sathianarayanan6550 4 роки тому

    Good one. I need to request to combine multi column into one with same row values... Thanks

  • @manmohansingh9109
    @manmohansingh9109 3 роки тому

    Hi. Thanks for this video. I am looking in getting the last 5 rows (multiple columns in these 5 rows). Any way?

  • @bhawanishekhawat3163
    @bhawanishekhawat3163 4 роки тому +2

    It is really nice video, I am searching solutions little bit same like this video but some more complex, if you have solution please give, I want the column data in next sheets without empty cell but in primary sheets has the empty cells.
    I have around 45 column & I am searching solutions to bring all 45 column data in next sheets in one column without empty cell

    • @divi12345
      @divi12345 4 роки тому

      Bhawani Shekhawat use query function, query will be where d is not null , assuming d is the column which can never be blank if u have Data In its corresponding row

  • @mangoman692
    @mangoman692 4 роки тому +1

    How could I do an importrange() referencing a different sheet and pull the last non-empty cell from a column? For example, I've tried =Importrange("my.google.sheet.address", index(b2:b, counta(b2:b))), but the index and counta only seem to look at the sheet the formula is entered on, NOT the referenced sheet.
    I've also tried =index(importrange("my.google.sheet.address", counta(b2:b)) without success also.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +1

      =counta(importrange("my.google.sheet.address","b2:b"))

    • @mangoman692
      @mangoman692 4 роки тому +1

      @@ExcelGoogleSheets thanks for the quick reply...i actually kinda figured it out from a different video you published (ua-cam.com/video/4XMB03BqNm4/v-deo.html) & just swapped in counta for match. 👍🏼

  • @helmouthtrujillo920
    @helmouthtrujillo920 4 роки тому

    Excellent explained master, but I want know if is possible with scripts web app google create an user and password depending of spreadsheet

  • @anilsaroj209
    @anilsaroj209 4 роки тому

    What if cell (A) contains value comes from a formula? And entire column has formula which produce nil value (means "empty") Then?
    I tried but not working in above case.

  • @doseanator3
    @doseanator3 4 роки тому

    So I need to do some kind of index and match function that incorporates this. I want to see the last status of en employee. So i need this to match with a certain employee based on their last status. What you did in this video is close to what I need. But I also need to figure out how to tell the last status of each worker all in the same column. any advice on this?

  • @haydennguyen7960
    @haydennguyen7960 4 місяці тому

    You are the GOAT

  • @FaultyProgeny
    @FaultyProgeny 3 роки тому

    You da real MVP! Thank you.

  • @minhdangbay
    @minhdangbay 4 роки тому

    thank you so much. You just save my day!

  • @EalhamAlMusabbir
    @EalhamAlMusabbir 10 місяців тому

    Thank you so much...

  • @mapleleaf5573
    @mapleleaf5573 4 роки тому +1

    So amazing!! Thank you so much!

  • @DrAjaoMedia
    @DrAjaoMedia 4 роки тому +2

    Thanks so much for this. However, the row function points to an absolute row position starting from Row 1. My array doesn't start from the first row. Is there a way to reference a relative value such that Row 1 is seen as the row where my data starts rather than the actual first row on the sheet? #NoobAlert

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +1

      Isn't the last row number still the same? Just select the whole column.

    • @alliedtopics1310
      @alliedtopics1310 3 роки тому

      @@ExcelGoogleSheets But Index function is not considering absolute position. For it first entry in the column is the first position.

  • @x4ms
    @x4ms 3 роки тому

    Thanks. Very well done.

  • @NigelMills
    @NigelMills 2 роки тому

    is there a way to 2nd to last value, 3rd to last, etc? Love your videos

  • @brighnquisitive6217
    @brighnquisitive6217 4 роки тому

    Dude this was awesome work, thanks

  • @doseanator3
    @doseanator3 4 роки тому

    I love you! and your videos! thank you so much!!!

  • @kathyjebbia8956
    @kathyjebbia8956 4 роки тому

    I need this formula to arrayformula down the column. It works in the initial cell, but doesn't populate down the column. Can that be done?

  • @omhariprasadr
    @omhariprasadr 3 роки тому

    How can I highlight a last non blank cell in a column using conditional formatting.. ? Please help

  • @husniddinhojiboyev
    @husniddinhojiboyev 4 роки тому

    Thank you. Very helpfull for me

  • @h8203
    @h8203 4 роки тому

    thanks for the learning's. if Instead of row no.., I want to get the value in the last non empty cell, what changes do I have to make.

    • @JohnBGood1
      @JohnBGood1 4 роки тому

      He showed it in the video

  • @ashishtalyan
    @ashishtalyan 3 роки тому

    what about if used in data filtered columns to get last value ?

  • @jeremymccollom6304
    @jeremymccollom6304 2 роки тому

    This video was very helpful in what I have been trying to do but I am needing to get the data form a different column. I have a sheet that the array formula would be for column F but I need to get the data from column E based on the array. How is the best way to do that? I also need to have the same data displayed on a separate sheet within the same workbook. I have found your videos very helpful. Trying to learn google. Thank you

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      When you use INDEX function just highlight column E

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      ua-cam.com/video/iGvvK8O5BpQ/v-deo.html

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      Check out this video ua-cam.com/video/iGvvK8O5BpQ/v-deo.html

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      Watch this video ua-cam.com/video/iGvvK8O5BpQ/v-deo.html

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      ua-cam.com/users/LearnGoogleSpreadsheetssearch?query=google%20sheets%20linking%20data

  • @davidtopp1972
    @davidtopp1972 4 роки тому

    I would like to use what you have explained in this Video: “Google Sheets - Get Last Non-Empty Cell in Row or Column” The only additional thing is that I would like to sum up 2 cells in columns from 2 separate work sheets into my Dashboard Sheet. If this is possible, would you send me the formula lay out I need. I really enjoy your videos. I am still to expand my overall knowledge of google sheets. Thank you!
    5:24 / 16:09

    • @henkvinck888
      @henkvinck888 Рік тому

      In the worksheet where you want the number there
      type in the = then go to your worksheet and press the cell then enter and done

  • @citysurveyjunagadh5180
    @citysurveyjunagadh5180 2 роки тому

    How can we display the last record of the google sheet inside the google form whenever we open the google form?

  • @BerideYoutube
    @BerideYoutube 2 роки тому

    How if we want to pick the second last item?

  • @agarsu1
    @agarsu1 3 роки тому +1

    why not just use the if formula, if(row="",0,row(x))

  • @Evolution__X
    @Evolution__X 3 роки тому

    why does it show in 1 and 0, when u had "--" , what does "--" mean?

  • @maxm87
    @maxm87 2 роки тому

    Hi, thank you for the video. Is there a way to get this to work for a range on another sheet? I've tried using importrange and keep getting an error for the COLUMN or ROW function.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      ROW & COLUMN require a range, IMPORTRANGE returns an array.
      You could use SEQUENCE function to generate similar results to ROW or COLUMN, but it could be tricky if you use open references.

  • @ahmadsalih4850
    @ahmadsalih4850 3 роки тому

    you are the best

  • @castelinokelvin
    @castelinokelvin 2 роки тому

    Can you have multiple ArrayFormula in the same formula, example: =ARRAYFORMULA(INDEX('Form Responses 2'!A2:AN2,ARRAYFORMULA(MAX(COLUMN('Form Responses 2'!K2:AN2)*(--('Form Responses 2'!K2:AN2""))))))

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому +1

      You can have multiple array formulas, but you can't have nested arrays. Having several ARRAYFORMULA is the same as just doing one ARRAYFORMULA on the top level.
      That being said, INDEX function in Google Sheets doesn't handle arrays. It does in Excel. In this case your MAX shouldn't return an array, so it wouldn't matter.

    • @castelinokelvin
      @castelinokelvin 2 роки тому

      @@ExcelGoogleSheets But since the ArrayFormula is affecting in different ways in different spaces, it wont be the same, unless the whole formula has been tweaked right.
      I found this formula working at last,
      ARRAYFORMULA(IF(LEN(J2:J), VLOOKUP(J2:J,QUERY(SPLIT(FLATTEN('Form Responses 2'!K1:AN1&"_"&'Form Responses 2'!K2:AN),"_"), "Where Col2 ''", 0), 2, 0),))

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      It's not clear to me what you're trying to accomplish, so I have no idea 🙂

  • @Romariowll
    @Romariowll 9 місяців тому

    how get row number active cell automatic
    ?

  • @shiny_happiny42
    @shiny_happiny42 Рік тому

    Thanks!