Hi all,
I'm a newbie in VBA, I'm trying to program a command button or a function that will fill in the empty cells in a specific range or row in my sheet by "-".
Thanks in advance for all your help.
Hi all,
I'm a newbie in VBA, I'm trying to program a command button or a function that will fill in the empty cells in a specific range or row in my sheet by "-".
Thanks in advance for all your help.
What is the specific range Chuck?
Steve
"Nearly all men can stand adversity, but if you want to test a man's character, give him power."
-Abraham Lincoln
Hey Steve,
D11 to AY47
But it has to be only on the active row.
every cell in the row from D to AY that is blank?
Steve
"Nearly all men can stand adversity, but if you want to test a man's character, give him power."
-Abraham Lincoln
Yes.
Is it easier if I sent you my file ?
Any help ??
[vba]
Public Sub ProcessData()
Dim cell As Range
For Each cell In Intersect(Rows(ActiveCell.Row), Range("D11:AY47"))
If cell.Value = "" Then cell.Value = "-"
Next cell
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Thank you so much.
I'm just too slow to keep up with Bob....
Steve
"Nearly all men can stand adversity, but if you want to test a man's character, give him power."
-Abraham Lincoln
Ah don't worry about it
All your help has been great and very much appreciated.