(Msg. 1) Posted: Wed Nov 04, 2009 10:25 am
Post subject: Copy headin Archived from groups: microsoft>public>excel>misc (more info?)
I have a code that replaces anything in the column with a "+" with the column
heading name, however I cannot get the code to move to the next column and do
the same thing. Can anyone help>
Sub InsertRow()
Application.ScreenUpdating = False
lrow = Range("A" & Rows.Count).End(xlUp).Row
For i = lrow To 2 Step -1
c = 12
If Cells(i, c).Value Like "*+*" Then Cells(i, c).Value = Cells(1, c)
(Msg. 2) Posted: Wed Nov 04, 2009 11:00 am
Post subject: RE: Copy headin [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
'Try this:
Sub InsertRow()
Application.ScreenUpdating = False
'How many columns to look at?
For x = 1 To 25 Step 1
lrow = Cells(Rows.Count, x).End(xlUp).Row
For i = lrow To 2 Step -1
If Cells(i, x).Value Like "*+*" Then _
Cells(i, x).Value = Cells(1, x)
Next i
Next x
End Sub
--
Best Regards,
Luke M
*Remember to click "yes" if this post helped you!*
"David T" wrote:
> I have a code that replaces anything in the column with a "+" with the column
> heading name, however I cannot get the code to move to the next column and do
> the same thing. Can anyone help>
>
> Sub InsertRow()
>
> Application.ScreenUpdating = False
>
> lrow = Range("A" & Rows.Count).End(xlUp).Row
>
> For i = lrow To 2 Step -1
> c = 12
> If Cells(i, c).Value Like "*+*" Then Cells(i, c).Value = Cells(1, c)
>
> Next i
> End Sub
>
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum