+ Reply to Thread
Results 1 to 10 of 10

Last column with data .. kinda

  1. #1
    Registered User
    Join Date
    03-27-2019
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    13

    Question Last column with data .. kinda

    See attached.
    Problem. If B <> Closed or Resolved, then I need to find the last column with data-2. Example, number 3 would be 700.10.1.1

    I know how to do the IF and get the last column with data, but not how to get the 2nd to last column with data.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Last column with data .. kinda

    Here is a vba solution
    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    03-27-2019
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    13

    Re: Last column with data .. kinda

    Quote Originally Posted by alansidman View Post
    Here is a vba solution
    Please Login or Register  to view this content.
    Unfortunately I cant use VBA here. "Security reasons" lol

    What this is for, I need to subtract all the values that are not closed from the total number of values obtained. So if I can pull the number I can populate my countif statement on the other tabs of my worksheet.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Last column with data .. kinda

    Sorry, but I don't have any other solution for you. Maybe someone else will jump in. Good Luck.

  5. #5
    Registered User
    Join Date
    03-27-2019
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    13

    Re: Last column with data .. kinda

    Thank you. I was hoping to just do it row by row and use one of the blank columns.
    Like put something in Column C
    Example: =IF(B2<>"Closed",LOOKUP(2,1/(NOT(ISBLANK(E2:Z2))),E2:Z2),"")

    That gives me the last column but not the one I need.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Last column with data .. kinda

    Try this:

    =IF(B2<>"Closed",LOOKUP(2,1/(NOT(ISBLANK(E2:Z2))),OFFSET(E2:Z2,,-2)),"")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    03-27-2019
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    13

    Re: Last column with data .. kinda

    YES!!! Thank you!

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Last column with data .. kinda

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  9. #9
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,416

    Re: Last column with data .. kinda

    Quote Originally Posted by AliGW View Post
    Try this:

    =IF(B2<>"Closed",LOOKUP(2,1/(NOT(ISBLANK(E2:Z2))),OFFSET(E2:Z2,,-2)),"")
    You forgot about Column B having "Resolved" in it, the OP wanted that ignored also. This should fix your formula for that...

    =IF(AND(B3<>{"Closed","Resolved"}),LOOKUP(2,1/(NOT(ISBLANK(E3:Z3))),OFFSET(E3:Z3,,-2)),"")

    As an aside, this is the formula I came up with which also seems to work...

    =IF(AND(B2<>{"Closed","Resolved"}),LOOKUP(2,1/(E2:XFD2<>""),C2:XFB2),"")

    I did not know the maximum possible column that data could be placed in, so I just used the rest of the column. It would probably be more efficient to change them to something more closely related to the actual maximum column. If you do, note the red range must be two cells to the left of whatever is used for the blue range.
    Last edited by Rick Rothstein; 09-10-2019 at 01:06 AM.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Last column with data .. kinda

    I was working from the formula the OP gave in post #5, Rick - I didn't actually read the earlier post, since he said that almost worked. Thanks for the correction.

+ 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. Delete data that is kinda similar from list
    By Gronxpyk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-31-2019, 04:26 AM
  2. Transposing, Filtering Data... kinda...
    By imamachine149 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2016, 07:58 AM
  3. Hello! I'm 'new' (kinda)
    By SpannerPoint2 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-09-2013, 04:09 AM
  4. Excel Data Manipulation (Kinda like a Transpose)
    By ericy51 in forum Excel General
    Replies: 1
    Last Post: 07-14-2010, 08:19 PM
  5. Look ups? Kinda............
    By Merlin54k in forum Excel General
    Replies: 13
    Last Post: 12-19-2006, 04:20 PM
  6. kinda complicated need help
    By rjahr01 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-27-2006, 05:02 PM
  7. Comments box, kinda.
    By in_a_ru5h in forum Excel General
    Replies: 1
    Last Post: 06-30-2006, 05:11 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