Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
cae cae is offline
external usenet poster
 
Posts: 4
Default UDF to give position of item If list was Alpabetic


I would like to create a UDF to return the "position" (#)
of an item in a list, if the list "was" sorted
alphabetically.

OR

I have not found an existing combination of Excel
functions that can do this if there is let me know as well.

I am just learning VBA and not quite able to do this on my
own yet. I appreciate the help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default UDF to give position of item If list was Alpabetic

Hi
if your list is in A1:A100 try the following function (non VBA
solution):
=MATCH(value,A1:A100,0)
this returns the index number of 'value' in this list

--
Regards
Frank Kabel
Frankfurt, Germany


cae wrote:
I would like to create a UDF to return the "position" (#)
of an item in a list, if the list "was" sorted
alphabetically.

OR

I have not found an existing combination of Excel
functions that can do this if there is let me know as well.

I am just learning VBA and not quite able to do this on my
own yet. I appreciate the help.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default UDF to give position of item If list was Alpabetic

Look at the MATCH() function. More details in HELP

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"cae" wrote in message
...

I would like to create a UDF to return the "position" (#)
of an item in a list, if the list "was" sorted
alphabetically.

OR

I have not found an existing combination of Excel
functions that can do this if there is let me know as well.

I am just learning VBA and not quite able to do this on my
own yet. I appreciate the help.



  #4   Report Post  
Posted to microsoft.public.excel.programming
cae cae is offline
external usenet poster
 
Posts: 4
Default Clarification - UDF to give position of item If list was Alpabetic


Sorry, I should of been more specific.

The current list is "NOT" alphabetic, I hope that the UDF
could tell me the Position # if the list was sorted
Alphabetic.

Currently the NON-Alphabetic list is "Dynamic/changebale"
and generated by formulas, I hope that on a second sheet I
can create an equivalent Alphabetic listing that updates
automatically using the UDF formula in a column on the
first page with a Vlookup on the second page to create
Alpha list)

Thanks

-----Original Message-----

I would like to create a UDF to return the "position" (#)
of an item in a list, if the list "was" sorted
alphabetically.

OR

I have not found an existing combination of Excel
functions that can do this if there is let me know as

well.

I am just learning VBA and not quite able to do this on

my
own yet. I appreciate the help.
.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Clarification - UDF to give position of item If list was Alpabetic

I have noticed the possibility of comparing strings with and < an
strangely this seems to work. This macro runs down column A and pic
out the highest "value" string.

'-----------------------------------------
Sub test()
Dim MyString As String
Dim Rw As Long
'---------------------
MyString = ""
Rw = 1
'---------------------
While ActiveSheet.Cells(Rw, 1).Value < ""
If ActiveSheet.Cells(Rw, 1).Value MyString Then
MyString = ActiveSheet.Cells(Rw, 1).Value
End If
Rw = Rw + 1
Wend
MsgBox (MyString)
End Sub
'----------------------------------------

--
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
List and subtotal selected items, then print separate item list TitanG Excel Worksheet Functions 0 September 8th 08 09:07 PM
How do I give numerical values to each text item in a list Tomj37 Excel Discussion (Misc queries) 1 August 4th 08 07:21 PM
I need to pair each item on one list to each item on another list Peter R. Excel Worksheet Functions 1 August 24th 07 03:04 AM
Give RELEVANT responses to questions. DO NOT give usless list pmartin Excel Worksheet Functions 2 July 6th 06 06:08 PM
Selecting an Item from a List and getting a different item to pop. Matt Excel Worksheet Functions 1 December 7th 04 02:37 PM


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