Hi Ash,
You don't need VBA for that:
=FIND(":",A1)
returns 19
If you insist on using VBA, don't use a Sheet Module, use a standard module (in the
VB editor: InsertModule)
--
Kind regards,
Niek Otten
Microsoft MVP - Excel
"AshGrant" wrote in message ...
| Hi all. I am new to Excel VBA, Here's my problem.
| I have a string in a cell for example: "this is my string : category"
| What I need to be able to do is find the position of the ":" and return it
| as an integer. I understand you can use the InStr function to do this. But....
| How do I pass the result onto the spreadsheet itself?
| Further to that, how do I use this same function for 50 more rows below?
| I have tried using in the cell formula bar something like
| "=MyFunctionName(CurrentCell)"
| But all I keep getting in the cell is "#NAME!". Any ideas? Thank You.
|
| Ash.