ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need Help with If,Then (https://www.excelbanter.com/excel-programming/416824-need-help-if-then.html)

mrsjcd3

Need Help with If,Then
 
What I am trying to do is: if there is a name(text) in the cell, then change
it to an X, otherwise if the cell is blank, leave it blank. The data is in
the following range, E2:G3959

Thanks,
mrsjcd3



Gary''s Student

Need Help with If,Then
 
Sub change_um()
For Each cell In Range("E2:G3959")
If cell.Value = "" Then
Else
cell.Value = "X"
End If
Next
End Sub

--
Gary''s Student - gsnu200803


"mrsjcd3" wrote:

What I am trying to do is: if there is a name(text) in the cell, then change
it to an X, otherwise if the cell is blank, leave it blank. The data is in
the following range, E2:G3959

Thanks,
mrsjcd3



mrsjcd3

Need Help with If,Then
 
Thank you so much for the speedy help!!!

"Gary''s Student" wrote:

Sub change_um()
For Each cell In Range("E2:G3959")
If cell.Value = "" Then
Else
cell.Value = "X"
End If
Next
End Sub

--
Gary''s Student - gsnu200803


"mrsjcd3" wrote:

What I am trying to do is: if there is a name(text) in the cell, then change
it to an X, otherwise if the cell is blank, leave it blank. The data is in
the following range, E2:G3959

Thanks,
mrsjcd3




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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com