Solved

Excel to find first empty cells address in a given range

Posted on 2012-04-11
5
167 Views
Last Modified: 2012-04-17
Hi Experts

I have a range in Excel with a data range("A1:A100") , I need to find the first cell in the range that is empty and return its address, does anyone know the formula to find this?

Dave.
0
Comment
Question by:MrDavidThorn
  • 3
5 Comments
 
LVL 18

Accepted Solution

by:
krishnakrkc earned 500 total points
ID: 37833627
Hi,

One option

=CELL("address",INDEX(A1:A100,MATCH(TRUE,INDEX(A1:A100="",0,0),0)))

Kris
0
 
LVL 14

Expert Comment

by:Zack Barresse
ID: 37833661
Hello Dave,

You could use a formula like this...

=MIN(IF(LEN(OFFSET(A1,0,0,MATCH("*",A:A,-1)-1,1))=0,ROW(OFFSET(A1,0,0,MATCH("*",A:A,-1)-1,1))))

Open in new window


...which is an array-entered formula, entered with Ctrl + Shift + Enter, instead of just Enter.  This will give you an error if no answer is returnable.

Another formula, array-entered as well, could be...

=MATCH(TRUE,INDEX(A1:A100="",0),0)

Open in new window


Regards,
Zack Barresse
0
 
LVL 14

Expert Comment

by:Zack Barresse
ID: 37833665
I should mention the first formula I provided will error out if you have formulas returning a null value, while the second one will not.

Zack
0
 

Author Comment

by:MrDavidThorn
ID: 37833748
Brilliant thanks Kris/Zack

The end result of what I am actually trying to do is dyamically update a chart series I.e

=SERIES(BollingerBands!$A$6,,BollingerBands!$A$6:$A$500,3)

I know have the address of the last used cell thanks to your logic, how do I apply that actuall last cell address to the series

something like
=SERIES(BollingerBands!$A$6,,BollingerBands!$A$6:CELL("contents",A4),3)?
0
 
LVL 14

Expert Comment

by:Zack Barresse
ID: 37834963
Do you actually have data below the source data for the chart?

Zack
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now