Place Valuse in Cell depanding on another

  • Thread starter Thread starter Gerry
  • Start date Start date
G

Gerry

If C2 is blank then put value of B2 into C2 otherwise
leave C2 as it is. All data type are the same. Can anyone
help me with this please.
 
One way:

With Range("C2")
If IsEmpty(.Value) Then .Value = .Offset(0, -1).Value
End With
 
Many Thanks for this.
Now I want to replicate this down the column.

Can you assist.

Gerry
 
One way:

Dim rCell As Range
For Each rCell in Range("C2:C" & _
Range("C" & Rows.Count).End(xlUp).Row)
With rCell
If IsEmpty(.Value) Then .Value = .Offset(0, 1).Value
End With
Next rCell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top