Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
urgent! need to find "," in number
Hi I need to find out if a number cell in a cloumn contains "," and the fire
a msgbox i need to fire msgbox when i come across cell containg value 31,205 Usually, i would use instr or other string functions but being a number, thosse strigs are not working . Any help appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
urgent! need to find "," in number
Use the Text property of the range, not the Value property. E.g.,
Debug.Print InStr(Range("A1").Text, ",") -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "vbastarter" wrote in message ... Hi I need to find out if a number cell in a cloumn contains "," and the fire a msgbox i need to fire msgbox when i come across cell containg value 31,205 Usually, i would use instr or other string functions but being a number, thosse strigs are not working . Any help appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
urgent! need to find "," in number
I'd wonder before starting this whether the ',' isn't actually in the format
and not the value of the cell. If it's in the actual cell data then it will be a string search Excel may display 31,205, but it will actually be storing 31025 so looking for the ',' will not work. Check this out by highlighting the cell and looking at the value stored in the formula bar -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk "vbastarter" wrote in message ... Hi I need to find out if a number cell in a cloumn contains "," and the fire a msgbox i need to fire msgbox when i come across cell containg value 31,205 Usually, i would use instr or other string functions but being a number, thosse strigs are not working . Any help appreciated. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
urgent! need to find "," in number
Hi I need to find out if a number cell in a cloumn contains "," ...
i need to fire msgbox when i come across cell containg value 31,205 ...string functions ... are not working . Can you test for the number being 999 and the cell formatting's NumberFormat containing ","? Gregg Roberts |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
urgent! need to find "," in number
try using
range("A1").numberfornat like "*,*" "Nick Hodge" wrote in message ... I'd wonder before starting this whether the ',' isn't actually in the format and not the value of the cell. If it's in the actual cell data then it will be a string search Excel may display 31,205, but it will actually be storing 31025 so looking for the ',' will not work. Check this out by highlighting the cell and looking at the value stored in the formula bar -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk "vbastarter" wrote in message ... Hi I need to find out if a number cell in a cloumn contains "," and the fire a msgbox i need to fire msgbox when i come across cell containg value 31,205 Usually, i would use instr or other string functions but being a number, thosse strigs are not working . Any help appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Difficulty "countif"-ing number of "L1" or "L2" on an autofiltered | Excel Worksheet Functions | |||
"Find" in multiple sheets!!*********Urgent | Excel Worksheet Functions | |||
find/replace "cr" from end of number to "-" in front of number | Excel Discussion (Misc queries) | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) |