+ Reply to Thread
Results 1 to 4 of 4

How to find a previous value in a row before a non blank cell? (Photo Ins

  1. #1
    Registered User
    Join Date
    09-25-2018
    Location
    Salt Lake City
    MS-Off Ver
    Office 365
    Posts
    2

    How to find a previous value in a row before a non blank cell? (Photo Ins

    Hi Guys,

    I have the excel file below where I need to compare the current and previous week results (Columns Y and Z). My idea is to have a formula to find the current week which is the last filled column (in this example is the Column G) and the previous week before the last filled column. I know the formula to find the last filled cell but I couldn't solve the formula to find the previous cell.

    Does anyone know to help me?

    excel_example.jpg

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to find a previous value in a row before a non blank cell? (Photo Ins

    Hi raphazzz. Welcome to the forum.

    Honestly. Can't read that or work with it.

    Try uploading that Excel workbook directly to this forum. It gives context.

    Here's how:

    To attach a file to your post: (Please no pics or screenshots ... saves retyping data.),
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  3. #3
    Registered User
    Join Date
    09-25-2018
    Location
    Salt Lake City
    MS-Off Ver
    Office 365
    Posts
    2

    Re: How to find a previous value in a row before a non blank cell? (Photo Ins

    Actually, I have found a way to do it. Another thread had a similar issue but I'd like to understand the logic behind it.

    For finding the last value (numeric) in a roll on a specif rage I used this formula: =(LOOKUP(2,1/(ISNUMBER(E3:V3)),E3:V3))

    For finding the previous value before the last value (numeric) in a roll on a specif rage I used this formula: =INDEX(E3:V3,LARGE(INDEX((E3:V3<>"")*(COLUMN(E3:V3)-COLUMN(E3)+1),0),2))

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: How to find a previous value in a row before a non blank cell? (Photo Ins

    If you'll select the cell that has the formula in it and run the Evaluate Formula feature you'll see that after the ninth time that you select the Evaluate button there will be an array in which the columns that have values are listed as counting numbers (i.e. E3 = 1, F3 = 2 etc.), while the columns that do not contain values are listed as zeros. You'll then see that at that point the LARGE function is applied with a Kth value (pull up the help page for LARGE) of 2, meaning it will pass along the 2nd largest value from the array to the Index function. (I hope that makes sense).
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Display blank cell if previous cell is blank in formula
    By Brent951 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-29-2016, 03:34 PM
  2. Replies: 1
    Last Post: 07-22-2016, 04:03 PM
  3. [SOLVED] Find last max. value in list and count all previous non-blank cells in adjacent column
    By zeegerman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2015, 05:01 PM
  4. [SOLVED] Find certain word, copy and paste cell in previous row if previous row is blank
    By steven_e in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2013, 12:53 PM
  5. [SOLVED] Find last previous non blank value and summarise previous 6 months
    By Lady_Shaz in forum Excel General
    Replies: 7
    Last Post: 12-11-2012, 06:20 AM
  6. [SOLVED] Find first non-blank cell after a group of blanks copy offset cells, find next blank, loop
    By gwsampso in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-21-2012, 06:11 AM
  7. Replies: 1
    Last Post: 04-30-2012, 06:02 AM

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