SHARE
TWEET

Untitled

a guest Jun 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim i As Integer
  2. Dim j As Integer
  3. Dim WB As Workbook
  4. Dim WS As Worksheet
  5. Dim orange As Range
  6.  
  7.  
  8. Set WB = ThisWorkbook
  9. j = ActiveCell.Column
  10. i = 3
  11.  
  12.  
  13.  If WS.Name Like "*Other*" Then
  14.    WS.Select
  15.   ActiveSheet.Range ("B1:Z500")
  16.   orange.Replace What:=Range("A3"), Replacement:=Range("A4"),
  17.   MatchCase:=True
  18.  
  19. Else
  20.  
  21.    With WS
  22.  
  23.     For i = 3 To 5
  24.     If .Range("A" & i) = "y" And IsEmpty(Cells(i, j)) Then
  25.         .Cells(i, j - 1).Copy .Cells(i, j - 1).Offset(0, 1)
  26.  
  27.         .Cells(i, j - 1).Offset(0, 1).Select
  28.  
  29. End If
  30.  
  31. Next i
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top