Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Last valid value in array

Hi,

I have written a UDF to search through a range to find the last vali
value eg:

a b c d e
1 1 5 5
2 6
3 1 7 8

In these examples 5, 6 and 8 would be the last valid enties

Basically I transfer the range to an array and search from the end bac
until I find a value. The problem is that the values don't update whe
data is changed. I had thought about using application.volatile bu
this is dangerous and has caused me problems in the past.

Is there and easier way to do this either by formula or better designe
UDF???

Cheers,

B

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Last valid value in array

Use

=INDEX(1:1, MATCH(9.999999E+307,1:1))

and drag the formula down..

--
Regards

Juan Pablo González

"bcmiller " wrote in message
...
Hi,

I have written a UDF to search through a range to find the last valid
value eg:

a b c d e
1 1 5 5
2 6
3 1 7 8

In these examples 5, 6 and 8 would be the last valid enties

Basically I transfer the range to an array and search from the end back
until I find a value. The problem is that the values don't update when
data is changed. I had thought about using application.volatile but
this is dangerous and has caused me problems in the past.

Is there and easier way to do this either by formula or better designed
UDF???

Cheers,

BC


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Last valid value in array

It works a treat. Many thanks

--
Message posted from http://www.ExcelForum.com

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
How to do - B2 is only valid if B1 is zero declaire9 Excel Discussion (Misc queries) 1 April 13th 10 06:45 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
'reference is not valid' Tim Excel Discussion (Misc queries) 12 June 21st 06 07:36 PM
Reference is not valid Steved Excel Worksheet Functions 1 January 30th 06 10:56 PM
Array formulas are not valid in merged cells. [email protected] Excel Programming 1 October 17th 03 04:13 PM


All times are GMT +1. The time now is 02:59 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"