LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Finding a value quickly using VBA

Lets assume I have a column of numbers sorted in ascending order. Suppose
these numbers occupy the range B1:B1000. Suppose I want VBA code for

Function FindNum(Num as Long) as Long
[code]
End Function

which returns 0 if Num is not in column B and if it is returns the first row
in which Num is located. I realize I could write a loop to do this but is
there a faster, non-loop method? What about the case in which the numbers in
col B are not sorted?

Thanks

--
-regards
 
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
What is filtered in a Pivot Table? Finding out quickly... BenS Excel Discussion (Misc queries) 0 April 3rd 07 01:32 PM
please help (need quickly) p-nut Excel Discussion (Misc queries) 4 December 29th 06 07:38 PM
How to I get to the last entry quickly tweacle Excel Worksheet Functions 2 March 22nd 06 11:16 PM
need help quickly!! alexm999 Excel Discussion (Misc queries) 3 February 28th 06 02:42 PM
Need help, quickly please ame9 Setting up and Configuration of Excel 1 August 3rd 05 08:57 PM


All times are GMT +1. The time now is 03:25 AM.

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

About Us

"It's about Microsoft Excel"