View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default number as text confusing code

One thing you can do is to do a find and replace on 0. When the replace is
done, the text "0" should be magically transformed to the number 0.

HTH

"Papa Jonah" wrote:

I am currently using code to create a table which includes all of the
categories found in a list and the number of times each category is found in
the list.
As part of this, I have the following line of code:
If item = Cells(u + 1, "AR") Then

This works great except in once instance where "item" or the contents of
cell(u+1, "AR") may be "0". Is there a way to re-write the line so that it
is not confused by a number as text?

TIA