+ Reply to Thread
Results 1 to 21 of 21

penultimate cell non empty

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    penultimate cell non empty

    Hello to all.
    This formula:

    =SE(A100>0;"devi aggiungere nuove righe";"")
    = IF (A 100> 0, "you need to add new rows", "")

    if last cell is empty it displays the message.
    For the penultimate cell non empty you can edit?
    A greeting.
    max_max

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: penultimate cell non empty

    Are you looking for the last non-empty cell in Column A? Or the next to last non-empty cell in Column A (A1:A100)?

    Does Column A have numeric or text entries (or both)?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: penultimate cell non empty

    Last non-empty cell in column A.
    Both values
    max_max

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: penultimate cell non empty

    Last Non-empty cell in Column A assuming both numbers and text are in A

    =INDEX($A$1:$A$500), MAX(MATCH("zzzzz", $A$1:$A$500), MATCH( 9E99, $A$1:$A$500))

    If it's just text, use just the zzzzz match. If it's just numbers, use the 9E99 match

  5. #5
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: penultimate cell non empty

    below will check last non empty cell with both text or numbers or only text or only numbers
    =LOOKUP(2,1/(A1:A500<>""),A1:A500)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  6. #6
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: penultimate cell non empty

    Hello to all.
    Maybe I explained myself wrong.
    This formula:

    =SE(A100>0;"devi aggiungere nuove righe";"") '<<< italian
    =IF(A 100>0,"you need to add new rows","") '<<< english

    if last cell is empty it displays the message.
    The change is only if a value is entered in the penultimate row not empty where to display the message "you need to add new rows".
    The formula by inserting new rows should be updated by itself.
    I hope I explained.
    max max

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: penultimate cell non empty

    I assumed:
    data: A1:A100
    formula: B2 and down
    =IF(AND(A1<>"",A2=""),"msg","")
    or if you want data and formula in the same column, first you should turn on iterative calculation and (with data in A1) put formula into A2, and recalculate sheet, but this is not good solution.
    or look for VBA solution

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: penultimate cell non empty

    This:

    Quote Originally Posted by hemesh View Post
    =LOOKUP(2,1/(A1:A500<>""),A1:A500)
    should only ever be used in place of this:

    Quote Originally Posted by ChemistB View Post
    =INDEX($A$1:$A$500,MAX(MATCH("zzzzz",$A$1:$A$500),MATCH( 9E99,$A$1:$A$500))
    (I corrected a typo in the range being passed to INDEX) if there may be null strings ("") present within the range, since the latter is otherwise much, much faster than the former (though unfortunately fails if null strings are present at the end of the range).

    Actually, technically the double-MATCH set-up as given will also fail if there are either no numbers or no text entries within the range, so you should use something like:

    =INDEX(A:A,AGGREGATE(14,6,MATCH(CHOOSE({1,2},"zzzzz",9E99),A:A),1))

    to handle a MATCH error.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  9. #9
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: penultimate cell non empty

    Hello,
    in the attached file I tried with sandy666 solution but do not update if you add new rows.
    I also tried other formulas posted but I could not run.
    max_max

    penultima cella.xls

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: penultimate cell non empty

    with your last example, try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    but this is working with one column (in this case: A:A)

  11. #11
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: penultimate cell non empty

    Hello sandy666,
    error here:

    (9.99999999999999E+307

    Maybe you are missing a piece of the formula?
    max_max

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: penultimate cell non empty

    replace to: 9999
    I don't remember max numeric value in cell for EX 2007

    EDIT:
    Largest allowed positive number 9.99999999999999E+307
    Applies To: Excel 2007
    Excel specifications and limits
    adapt my formula with ; not with ,

    Italian version:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by sandy666; 02-13-2016 at 03:46 PM.

  13. #13
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: penultimate cell non empty

    Also error in Italian.

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: penultimate cell non empty

    error with the same thing?
    don't be so humble person and type more information

    it's weird because I copied formula a few times to different places in your example file and it works every time.
    I can't check italian version, I can translate only so you need to check where is my error
    and can't check it in EX2007, sorry.
    Last edited by sandy666; 02-13-2016 at 03:58 PM.

  15. #15
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: penultimate cell non empty

    Error image

    Appunti01.jpg

  16. #16
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: penultimate cell non empty

    check this one:
    Attachment 446508

    or check decimal point, not dot " . " but comma " , "
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or replace: 9,99999999999999E+307 with 2^512 and there will be no problem with dot or comma
    Last edited by sandy666; 02-13-2016 at 04:35 PM.

  17. #17
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: penultimate cell non empty

    [deleted] double post

  18. #18
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: penultimate cell non empty

    try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Italian ver.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If you've last empty row in the range of data, formula will show nothing else "Add row"
    hope it will work correctly

    edit:
    from the left and right side of table cannot be any numeric values. table should be alone in the worksheet but you need to check yourself how it works. I don't know how big table will be so I did it from start to the end of sheet.

    Last row and column with numeric value - add row.xlsx
    Last edited by sandy666; 02-14-2016 at 01:18 AM. Reason: italian ver. added

  19. #19
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: penultimate cell non empty

    Hello sandy666.
    I think is a good job.
    I have to try on a more wokksheet, but it should be accurate.
    Thank you.
    A greeting.
    max_max

  20. #20
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: penultimate cell non empty

    Glad to help/
    If problem is resolved mark thread as solved. Thank you
    Don't forget give a star if help was good

  21. #21
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: penultimate cell non empty

    I'm stubborn

    here is formula for numeric and text values, but it's "memory eager" formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    IMHO, better to use is formula for numeric values only OR for text values only.

    That's all I think

+ 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. [SOLVED] Return penultimate value in a range
    By Alan 87 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-23-2014, 08:14 AM
  2. penultimate sheet
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-04-2014, 09:48 AM
  3. [SOLVED] Penultimate Value in Column
    By Fletch74 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-01-2014, 07:26 PM
  4. [SOLVED] Find Penultimate Non-Blank Cell in Column
    By Jennasis in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2013, 05:11 AM
  5. [SOLVED] Return penultimate value in a range
    By Sophie.Durrant in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-05-2013, 07:00 AM
  6. reverse lookup - last value & penultimate value
    By bowgieman in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-28-2013, 10:17 AM
  7. Penultimate, Second Value in a range
    By Bob@Sun in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-28-2009, 04:25 PM

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