Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-15-2015, 09:13 AM
Anyroad Anyroad is offline Formula to return next non-blank cell in a range Windows 7 64bit Formula to return next non-blank cell in a range Office 2013
Novice
Formula to return next non-blank cell in a range
 
Join Date: Sep 2015
Posts: 3
Anyroad is on a distinguished road
Default Formula to return next non-blank cell in a range

Need help with formula for finding and returning the next non-blank cell in a range. Goal is to populate column B by formula.




A B
1 18246 18260
2 18260 18381
3
4 18381 18394
5
6
7 18394 18441
8 18441 18445
9
10 18445 18709


For each row, I need a formula in column B that pulls the next available number from a subsequent row in column A, regardless of how many blank rows there are between them -- there could be no blanks at all, or there could be many.

Ideally, I'd also like an if-then that says if there's no value in column A for a row, then there's no corresponding value in column B (i.e., leave the column B cell blank) so I can just copy and past the formula down all of column B and not have to got back and delete all the nulls.

I'd really appreciate any suggestions to make this work! It needs to be Excel 2007 compatible.

Thanks

Last edited by Anyroad; 09-15-2015 at 09:16 AM. Reason: Example spreadsheet appearance adjustment
Reply With Quote
  #2  
Old 09-15-2015, 02:12 PM
trainingclc trainingclc is offline Formula to return next non-blank cell in a range Windows 10 Formula to return next non-blank cell in a range Office 2013
Novice
 
Join Date: Sep 2015
Location: Houston, TX
Posts: 16
trainingclc is on a distinguished road
Default

=IFNA(IF(ISBLANK(A16),"",INDEX(A17:$A$100,MATCH(FA LSE,ISBLANK(A17:$A$100),0))),"")

make sure to do a CTRL+SHIFT+ENTER when you first paste it in.

This will find the next non empty cell in "A" and put it in "B" otherwise it will return nothing and when it gets to end it will leave nothing since there is not another

I am assuming that you won't have any more than 100 empty rows between numbers. If that is the case you can just increase that number or use something like =macth(9.99999999999999E+307,A:A,1) to get the last cell in your row.
Reply With Quote
  #3  
Old 09-15-2015, 02:33 PM
Anyroad Anyroad is offline Formula to return next non-blank cell in a range Windows 7 64bit Formula to return next non-blank cell in a range Office 2013
Novice
Formula to return next non-blank cell in a range
 
Join Date: Sep 2015
Posts: 3
Anyroad is on a distinguished road
Default

Brilliant! Works like a charm -- thanks very much!!
Reply With Quote
  #4  
Old 09-15-2015, 02:51 PM
trainingclc trainingclc is offline Formula to return next non-blank cell in a range Windows 10 Formula to return next non-blank cell in a range Office 2013
Novice
 
Join Date: Sep 2015
Location: Houston, TX
Posts: 16
trainingclc is on a distinguished road
Default

I think I coppied the wrong cell. That was the formula I had in row 16 and for some reason FALSE has a space in it. I guess you figured that out.

=IFNA(IF(ISBLANK(A12),"",INDEX(A13:A110,MATCH(FALS E,ISBLANK(A13:A110),0))),"")

I also took out the $ since that would only allow for 100 rows max.
Reply With Quote
  #5  
Old 09-15-2015, 04:13 PM
Anyroad Anyroad is offline Formula to return next non-blank cell in a range Windows 7 64bit Formula to return next non-blank cell in a range Office 2013
Novice
Formula to return next non-blank cell in a range
 
Join Date: Sep 2015
Posts: 3
Anyroad is on a distinguished road
Default

Yep, I fixed the space in "FALSE", and adjusted the range for my actual. I was going nuts trying to get the match syntax correct inside my version of the array. Your solution was spot on -- much appreciated!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to return next non-blank cell in a range If id cell range is empty then should not allow to fill any other cell ubns Excel Programming 2 04-12-2015 06:31 AM
Formula to return next non-blank cell in a range Excel Formula: return a range of cells that match tinfanide Excel 4 08-30-2014 07:03 AM
Change formula cell range based on cell value Scoth Excel 4 10-25-2012 07:51 AM
Formula to return next non-blank cell in a range How to remove blank rows from a specified range? Learner7 Excel 1 04-19-2011 02:45 AM
Formula to return next non-blank cell in a range Moving formula range multiple cells when moving sum over one cell FraserKitchell Excel 4 02-26-2010 10:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft