Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
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
Difficulty "countif"-ing number of "L1" or "L2" on an autofiltered pmdoherty Excel Worksheet Functions 4 February 6th 09 11:23 AM
"Find" in multiple sheets!!*********Urgent James8309 Excel Worksheet Functions 0 May 20th 08 12:25 AM
find/replace "cr" from end of number to "-" in front of number Dave o Excel Discussion (Misc queries) 2 August 22nd 06 09:24 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM


All times are GMT +1. The time now is 02:21 PM.

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"