Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check a string?

Status
Not open for further replies.

sanjna000

Programmer
Aug 1, 2003
132
GB
Hi there,

In VBA how do u check whether a particular cell value has a string value in it?

I need to check my current cell value has a 'character value' in it. If there is a string value, i need to replace with a number, otherwise need to add the second number into already available number.

Thanks a lot for u r help in advance
Sanjna...
 
Sanjna,
Code:
With Cells(r, c)
   If Len(.Value) > 0 Then
      If IsNumeric(.Value) Then
        'houston, we have a NUMBER"
  
      Else

      End If
   End If
End With



Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
Thank you so much Skip. You are a STAR !!!

Sanjna...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top