+ Reply to Thread
Results 1 to 2 of 2

Next empty cell in a different sheet

  1. #1
    Registered User
    Join Date
    08-26-2015
    Location
    North Carolina, USA
    MS-Off Ver
    14.5.4
    Posts
    1

    Question Next empty cell in a different sheet

    Hello,

    I work at a fitness center. We have an equipment checkout system that we use Excel for. In my "Lockers" sheet, locker keys get checked out and checked back in. Right now, if a locker key does not get returned, I use this formula to pull the key they checked out into another sheet called "Unreturned"... I have three other formulas in adjacent cells that look exactly like the one below, but they pull the patron's first name, last name, and ID number.

    =IF(Lockers!B2<>"",IF(Lockers!J2="",CELL("contents",Lockers!H2),""),"")

    The only problem is, on my "Unreturned" sheet, it pulls the information into the parallel cell. For example, if the locker key in row 4 is unreturned, it pulls to row 4 on the "Unreturned" sheet. If the locker key in row 298 is unreturned, it pulls to row 298 on the "Unreturned" sheet, which means I have to scroll through the entire spreadsheet to find all of the unreturned equipment.

    How do I make the "Unreturned" sheet pull the information from the "Lockers" sheet into the next available cell?

    Thanks
    Michaela

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Next empty cell in a different sheet

    Use a KEY column to index each row that currently has UNRETURNED status. The first row would index as 1, the second would index as 2, etc.

    Then on the UNRETURNED sheet, you use an INDEX formula to pull back just the indexes rows, in order, together.

    Assuming the column on sheet1 is M, in an empty column N let's add this formula:

    =IF(M2<>"Unreturned", "", COUNTIF($M$1:$M2, "Unreturned"))

    Copy that down.
    ---------
    On sheet 2 we will use column A to create a numbered list.

    A2: =IF(ROW(A1)>MAX(Sheet1!$N:$N), "", ROW(A1))
    B2: =IF($A2="", "", INDEX(Sheet1!A:A, MATCH($A2, Sheet1!$N:$N, 0))

    Coopy B2 to the right as needed.

    Copy Row2 down as far as expected.


    Now as you change the status of items in sheet1 column M to "Unreturned", the index will update as will the extraction on sheet2.

    Play around with that.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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] Copy From one Sheet to the Next empty cell on the next
    By John Swift in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-03-2015, 04:29 PM
  2. cutting and pasting row in other sheet if cell is empty
    By flunzy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-02-2014, 09:42 AM
  3. [SOLVED] Trouble copying 1st empty cell from one sheet to 1st empty cell in 2nd sheet.
    By BobW1952 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-29-2014, 02:56 PM
  4. If a cell is not empty paste it and another to another sheet....
    By dsmith7610 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2014, 09:46 AM
  5. [SOLVED] Macro to copy cell value of Sheet1 to next empty cell of colum A in Sheet 2
    By JamesFinch in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2014, 02:54 PM
  6. [SOLVED] Cooy from one sheet to another sheet until empty cell
    By RoMarius1981 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-21-2013, 08:08 AM
  7. copy cell value from one sheet to another if empty
    By perko121 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2010, 10:26 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