![]() |
|
#1
|
|||
|
|||
![]()
You are welcome.
Hello NoSparks ! How have you been ? |
#2
|
|||
|
|||
![]() Code:
Private Sub CommandButton1_Click() Dim ws As Worksheet Dim i As Integer For Each ws In Worksheets ws.Select For i = 1 To ws.Cells(Rows.Count, "Y").End(xlUp).Row If ws.Cells(i, "Y").Value = "G" And ws.Cells(i, "Z") > 1 Then ws.Range(ws.Cells(i - 1, "Y"), ws.Cells(i - 1, "Z")).Value = _ ws.Range(ws.Cells(i, "Y"), ws.Cells(i, "Z")).Value ws.Cells(i, "Y").Select Selection.EntireRow.Delete Shift:=xlUp End If Next i Next ws End Sub Last edited by Pecoflyer; 05-12-2018 at 12:15 AM. Reason: Added code tags |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Le_Blanc | Word VBA | 10 | 03-22-2021 11:38 AM |
Spell check macro within macro button field doesn't work in one document | samuelle | Word VBA | 0 | 07-20-2016 02:27 AM |
![]() |
LadyAna | Word | 1 | 12-06-2014 10:39 PM |
Macro Needed to bold specific lines and Macro to turn into CSV | anewteacher | Word VBA | 1 | 05-28-2014 03:59 PM |
custom icon, undo/redo for macro, permanent macro | Rapier | Excel | 0 | 08-05-2013 06:30 AM |