Nlhicks
Active Member
- Joined
- Jan 8, 2021
- Messages
- 264
- Office Version
- 365
- Platform
- Windows
My code currently only works if I go to Sheet2 but I really want it to work from "Line Update". Not sure how to make this happen I am open to suggestions.
Sub TryUpdate()
Dim RngRange01 As Range
rngRang01 = Range("A" & Rows.Count).End(xlUp).Row
Range("A2:P" & rngRang01).SpecialCells(xlCellTypeVisible).Select
If Worksheets("Line Update").Range("C11") <> Worksheets("Line Update").Range("F11") Then
Worksheets("Sheet2").Range("B2:B" & rngRang01).Value = Worksheets("Line Update").Range("F11").Value
End If
If Worksheets("Line Update").Range("C12") <> Worksheets("Line Update").Range("F12") Then
Worksheets("Sheet2").Range("C2:C" & rngRang01).Value = Worksheets("Line Update").Range("F12").Value
End If
If Worksheets("Line Update").Range("C13") <> Worksheets("Line Update").Range("F13") Then
Worksheets("Sheet2").Range("D2:D" & rngRang01).Value = Worksheets("Line Update").Range("F13").Value
End If
If Worksheets("Line Update").Range("C14") <> Worksheets("Line Update").Range("F14") Then
Worksheets("Sheet2").Range("E2:E" & rngRang01).Value = Worksheets("Line Update").Range("F14").Value
End If
If Worksheets("Line Update").Range("C15") <> Worksheets("Line Update").Range("F15") Then
Worksheets("Sheet2").Range("F2:F" & rngRang01).Value = Worksheets("Line Update").Range("F15").Value
End If
If Worksheets("Line Update").Range("C16") <> Worksheets("Line Update").Range("F16") Then
Worksheets("Sheet2").Range("G2:G" & rngRang01).Value = Worksheets("Line Update").Range("F16").Value
End If
If Worksheets("Line Update").Range("C17") <> Worksheets("Line Update").Range("F17") Then
Worksheets("Sheet2").Range("H2:H" & rngRang01).Value = Worksheets("Line Update").Range("F17").Value
End If
If Worksheets("Line Update").Range("C18") <> Worksheets("Line Update").Range("F18") Then
Worksheets("Sheet2").Range("I2:I" & rngRang01).Value = Worksheets("Line Update").Range("F18").Value
End If
I had a shorter version of this created and it worked for a little while but it quit working so I am not sure it was the right one.
Sub TryUpdate()
Dim RngRange01 As Range
rngRang01 = Range("A" & Rows.Count).End(xlUp).Row
Range("A2:P" & rngRang01).SpecialCells(xlCellTypeVisible).Select
If Worksheets("Line Update").Range("C11") <> Worksheets("Line Update").Range("F11") Then
Worksheets("Sheet2").Range("B2:B" & rngRang01).Value = Worksheets("Line Update").Range("F11").Value
End If
If Worksheets("Line Update").Range("C12") <> Worksheets("Line Update").Range("F12") Then
Worksheets("Sheet2").Range("C2:C" & rngRang01).Value = Worksheets("Line Update").Range("F12").Value
End If
If Worksheets("Line Update").Range("C13") <> Worksheets("Line Update").Range("F13") Then
Worksheets("Sheet2").Range("D2:D" & rngRang01).Value = Worksheets("Line Update").Range("F13").Value
End If
If Worksheets("Line Update").Range("C14") <> Worksheets("Line Update").Range("F14") Then
Worksheets("Sheet2").Range("E2:E" & rngRang01).Value = Worksheets("Line Update").Range("F14").Value
End If
If Worksheets("Line Update").Range("C15") <> Worksheets("Line Update").Range("F15") Then
Worksheets("Sheet2").Range("F2:F" & rngRang01).Value = Worksheets("Line Update").Range("F15").Value
End If
If Worksheets("Line Update").Range("C16") <> Worksheets("Line Update").Range("F16") Then
Worksheets("Sheet2").Range("G2:G" & rngRang01).Value = Worksheets("Line Update").Range("F16").Value
End If
If Worksheets("Line Update").Range("C17") <> Worksheets("Line Update").Range("F17") Then
Worksheets("Sheet2").Range("H2:H" & rngRang01).Value = Worksheets("Line Update").Range("F17").Value
End If
If Worksheets("Line Update").Range("C18") <> Worksheets("Line Update").Range("F18") Then
Worksheets("Sheet2").Range("I2:I" & rngRang01).Value = Worksheets("Line Update").Range("F18").Value
End If
I had a shorter version of this created and it worked for a little while but it quit working so I am not sure it was the right one.