LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Serial Order

This a part from may UDF, my question if I want to put the same serial
number regardless the order eg.( "D10604" And rng < "D11201" And rng <
"D11202" And rng < "D11203" And rng < "D11204") I want to put in any order
there is any code to do that, because if Im not put in serial order it will
not give me the perfect result.

my UDF like
Function Sector(rng As Variant) As Variant

If rng Like "D*" And rng < "D10601" And rng < "D10602" And rng <
"D10603" And rng < "D10604" And rng < "D11201" And rng < "D11202" And rng
< "D11203" And rng < "D11204" And rng < "D11205" And rng < "D11210" And
rng < "D11211" And rng < "D11214" And rng < "D11215" And rng < "D11217"
And rng < "D11218" And rng < "D11219" And rng < "D11220" And rng <
"D11221" And rng < "D11222" And rng < "D11403" And rng < "D11501" And rng
< "D11701" And rng < "D11702" And rng < "D11705" And rng < "D11706" And
rng < "D11808" And rng < "D11901" And rng < "D11902" And rng < "D12001"
And rng < "D12002" And rng < "D12501" And rng < "D13001" And rng <
"D13005" And rng < "D20401" And rng < "D20501" And rng < "D20503" And rng
< "D20504" And rng < "D20601" And rng < "D30103" And rng < "D40203" And
rng < "D40204" And rng < "D50101" "F10402" Then
Sector = "JOHNSON"

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
How to change series plotting order without changing legend order? PatrickM Charts and Charting in Excel 6 December 2nd 09 07:43 PM
For chart syles, why doesn't color order match series order? AMiller Charts and Charting in Excel 1 October 29th 09 12:02 AM
how do I do first order serial correlation in Excel 2007 RICHIE New Users to Excel 2 September 29th 08 11:15 PM
How stop Excel file UK date order changing to US order in m.merge Roger Aldridge Excel Discussion (Misc queries) 1 October 9th 07 11:52 PM
Daily Macro to Download Data, Order and paste in order Iarla Excel Programming 1 November 17th 04 11:55 AM


All times are GMT +1. The time now is 03:17 PM.

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"