D
Dino
Hello, there was a previously posted solution that worked great for moving
the value of one column to another column if certain criteria were met. The
code below analyzes column G, and if the cell in the same row in column C is
blank, then the value from column G is entered into that cell in column C.
Option Explicit
Sub Fillblanks()
Dim myRng As Range
Dim myCell As Range
With Activesheet
Set myRng = .Range("G1", .Cells(.Rows.Count, "G").End(xlUp))
For Each myCell In myRng.Cells
If .Cells(myCell.Row, "C").Value = "" Then
.Cells(myCell.Row, "C").Value = myCell.Value
myCell.Value = ""
End If
Next myCell
End With
End Sub
The result that I need is this:
Analyze column G and C the same way, and if the two values are equal to each
other, then move the values from column G and H ( I have two columns that are
associated with each other) to columns D and E. Would it also be possible to
analyze columns C and G, and move the values from G and H to wherever the
matching C values are, regardless if they are in the same row or not?
Thanks.
Dino
the value of one column to another column if certain criteria were met. The
code below analyzes column G, and if the cell in the same row in column C is
blank, then the value from column G is entered into that cell in column C.
Option Explicit
Sub Fillblanks()
Dim myRng As Range
Dim myCell As Range
With Activesheet
Set myRng = .Range("G1", .Cells(.Rows.Count, "G").End(xlUp))
For Each myCell In myRng.Cells
If .Cells(myCell.Row, "C").Value = "" Then
.Cells(myCell.Row, "C").Value = myCell.Value
myCell.Value = ""
End If
Next myCell
End With
End Sub
The result that I need is this:
Analyze column G and C the same way, and if the two values are equal to each
other, then move the values from column G and H ( I have two columns that are
associated with each other) to columns D and E. Would it also be possible to
analyze columns C and G, and move the values from G and H to wherever the
matching C values are, regardless if they are in the same row or not?
Thanks.
Dino