Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Array Formulas and Last Cell

I have an array formula that extends 1500 rows. The formula in the cells
return data from another source. I need to graph this data, but the graph
(as expected) plots all the cells with no actual value.

How do I detect what row the last real value is contained in?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Array Formulas and Last Cell

=MAX(ROW(A1:A1500)*(A1:A1500<""))

entered as an array formula with <Ctrl <Shift <Enter.

--

Vasant


"PosseJohn" wrote in message
...
I have an array formula that extends 1500 rows. The formula in the cells
return data from another source. I need to graph this data, but the graph
(as expected) plots all the cells with no actual value.

How do I detect what row the last real value is contained in?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Array Formulas and Last Cell

I need to do this in VBA. I do not have the ROW function available.



"Vasant Nanavati" wrote:

=MAX(ROW(A1:A1500)*(A1:A1500<""))

entered as an array formula with <Ctrl <Shift <Enter.

--

Vasant


"PosseJohn" wrote in message
...
I have an array formula that extends 1500 rows. The formula in the cells
return data from another source. I need to graph this data, but the graph
(as expected) plots all the cells with no actual value.

How do I detect what row the last real value is contained in?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Array Formulas and Last Cell

Simplified version:

Function LastRow() As Long
Dim i As Long
For i = 1500 to 1 Step -1
If Range(i, 1) < "" Then
LastRow = i
Exit For
End If
Next
End Function

--

Vasant



"PosseJohn" wrote in message
...
I need to do this in VBA. I do not have the ROW function available.



"Vasant Nanavati" wrote:

=MAX(ROW(A1:A1500)*(A1:A1500<""))

entered as an array formula with <Ctrl <Shift <Enter.

--

Vasant


"PosseJohn" wrote in message
...
I have an array formula that extends 1500 rows. The formula in the

cells
return data from another source. I need to graph this data, but the

graph
(as expected) plots all the cells with no actual value.

How do I detect what row the last real value is contained in?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Array Formulas and Last Cell

That works great, thankyou for your brain.

"Vasant Nanavati" wrote:

Simplified version:

Function LastRow() As Long
Dim i As Long
For i = 1500 to 1 Step -1
If Range(i, 1) < "" Then
LastRow = i
Exit For
End If
Next
End Function

--

Vasant



"PosseJohn" wrote in message
...
I need to do this in VBA. I do not have the ROW function available.



"Vasant Nanavati" wrote:

=MAX(ROW(A1:A1500)*(A1:A1500<""))

entered as an array formula with <Ctrl <Shift <Enter.

--

Vasant


"PosseJohn" wrote in message
...
I have an array formula that extends 1500 rows. The formula in the

cells
return data from another source. I need to graph this data, but the

graph
(as expected) plots all the cells with no actual value.

How do I detect what row the last real value is contained in?






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
Convert Array Formulas to Regular Formulas Domenick Excel Worksheet Functions 6 August 17th 15 09:16 PM
Convert Array Formulas to Regular Formulas minyeh Excel Worksheet Functions 0 March 21st 10 05:55 AM
Prevent cell/array references from changing when altering/moving thecell/array nme Excel Discussion (Misc queries) 1 September 19th 08 01:53 PM
Array Formulas Peledon Excel Worksheet Functions 2 February 9th 07 12:21 PM
Function CELL in array formulas vezerid Excel Discussion (Misc queries) 3 October 17th 06 07:30 PM


All times are GMT +1. The time now is 11:21 PM.

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"