examine a value then leave it or increment...

I

Ivano

Hi,
I have a column of numbers and want a macro that will examine the value in
cel A1 and if it is eqal to or less then 5 then leave it alone else increment
the number by one.


Thanks,
 
K

Karl E. Peterson

Ivano said:
I have a column of numbers and want a macro that will examine the value in
cel A1 and if it is eqal to or less then 5 then leave it alone else increment
the number by one.

I have a cat, a dog, and two birds. I'd like a vacation.
 
D

DA

Private Sub Pets2Vacation()
If ActiveDocument.Tables(1).Cell(1, 1).Range.Text = "Cat, Dog and two birds"
Then
ActiveDocument.Tables(1).Cell(1, 1).Range.Text = "Vacation"
End If
End Sub
 
K

Karl E. Peterson

DA said:
Private Sub Pets2Vacation()
If ActiveDocument.Tables(1).Cell(1, 1).Range.Text = "Cat, Dog and two birds"
Then
ActiveDocument.Tables(1).Cell(1, 1).Range.Text = "Vacation"
End If
End Sub

To think! That's _all_ there is to it???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top