Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Current region emulation

Is it possible to emulate the current region property using a function? I
can't use VBA and need to get the number of rows from a starting cell till
the next blank row down.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Current region emulation

Try one of these in say, B1, normal ENTER to confirm:
=MATCH(TRUE,INDEX(A1:A1000="",),0)-1
=MATCH(TRUE,INDEX(ISBLANK(A1:A1000),),0)-1

MATCH bit will return the row number of the 1st "blank" cell down in
A1:A100, the "-1" adjusts it to the number of filled rows from A1 down

The 1st expression traps both real blanks and formula returned blanks, while
the 2nd traps only real blank cells. Any good? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"daverau" wrote:
Is it possible to emulate the current region property using a function? I
can't use VBA and need to get the number of rows from a starting cell till
the next blank row down.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Current region emulation

Typo, it should have read as "A1:A1000" in this line:
MATCH bit will return the row number of the 1st "blank" cell down in
A1:A100, the "-1" adjusts it to the number of filled rows from A1 down

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Current region emulation

Hi,

Try this

=MATCH(FALSE,INDEX(ISBLANK(range),,),0)-1

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"daverau" wrote in message
...
Is it possible to emulate the current region property using a function? I
can't use VBA and need to get the number of rows from a starting cell till
the next blank row down.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Current region emulation

Thanks for the response Ashish, but I get 0 as the answer. When I change it
to TRUE rather than FALSE, the correct expected number appears.

Much appreciated.

Daverau

"Ashish Mathur" wrote:

Hi,

Try this

=MATCH(FALSE,INDEX(ISBLANK(range),,),0)-1

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"daverau" wrote in message
...
Is it possible to emulate the current region property using a function? I
can't use VBA and need to get the number of rows from a starting cell till
the next blank row down.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Current region emulation

Thanks Max, that was exactly what I needed.

Cheers
Daverau

"Max" wrote:

Typo, it should have read as "A1:A1000" in this line:
MATCH bit will return the row number of the 1st "blank" cell down in
A1:A100, the "-1" adjusts it to the number of filled rows from A1 down

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste values all cells in a region which refers to out of region Vijay Excel Worksheet Functions 0 August 25th 09 06:03 AM
Sort doesn't recognize current region RobWN Excel Worksheet Functions 2 September 7th 07 10:48 PM
Host Session Emulation [email protected] Excel Worksheet Functions 0 December 27th 06 05:47 PM
Region Zaahir Excel Discussion (Misc queries) 2 November 14th 06 02:22 PM
lotus emulation Bill Williams Setting up and Configuration of Excel 1 February 14th 06 01:11 PM


All times are GMT +1. The time now is 12:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"