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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dealing with Text Strings in a cell.

Status
Not open for further replies.

MuskyMan

Technical User
Jul 31, 2002
36
US
I'm going to be dealing with a rather large spreadsheet monthly (8000+rows).

Cells in column "C" have both numbers and text strings. I need to convert the text strings to ZERO. I can't find the correct sytax for the If Then Loop to make the change. I keep getting a Type Mismatch error.

Thanks in advance for your help.
 
Hi MuskyMan,


Maybe some more info would help here?

an example perhaps

With regards

Mike
 
Mike,

Cell(1,"C").value=100
Cell(2,"C").value=525
Cell(3,"C").value="Nothing to report"
Cell(4,"C").value=1500
.
.
Cell(8524, "C").value="Nothing"

Row.count can be as high as 9100 and I need a loop to convert the text string (such as Cell 3, C above) to 0.

Hope the above helps..

 
Hi again MuskMan,

This is a question that should be posted in VBA for applications, there are ways to do this not using code, but they are to complicated imo

lett skip, ken, tony, xlbo, bleufdragon , .....
take a crack at this, they will help you in a jiffy


With regards

Mike
 
Hi MuskyMan,

In D1, put ..

[blue]
Code:
=IF(ISNUMBER(C1),C1,0)
[/blue]

Copy it down as far as your data in column C.

Now Select column D,
Edt > Copy
Edit > Paste Special > Values > OK
And Delete Column C

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top