Place Valuse in Cell depanding on another  
Author Message
Engineer1978





PostPosted: Tue May 25 03:18:29 CDT 2004 Top

Excel Programming >> Place Valuse in Cell depanding on another

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.

Excel397  
 
 
JE





PostPosted: Tue May 25 03:18:29 CDT 2004 Top

Excel Programming >> Place Valuse in Cell depanding on another One way:

With Range("C2")
If IsEmpty(.Value) Then .Value = .Offset(0, -1).Value
End With




> 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.
 
 
Gerry





PostPosted: Tue May 25 08:55:31 CDT 2004 Top

Excel Programming >> Place Valuse in Cell depanding on another Many Thanks for this.
Now I want to replicate this down the column.

Can you assist.

Gerry


>-----Original Message-----
>One way:
>
> With Range("C2")
> If IsEmpty(.Value) Then .Value = .Offset(0, -
1).Value
> End With
>


>
>> 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.
>.
>
 
 
JE





PostPosted: Tue May 25 09:40:56 CDT 2004 Top

Excel Programming >> Place Valuse in Cell depanding on another 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




> Many Thanks for this.
> Now I want to replicate this down the column.
>
> Can you assist.
>
> Gerry
>
>
> >-----Original Message-----
> >One way:
> >
> > With Range("C2")
> > If IsEmpty(.Value) Then .Value = .Offset(0, -
> 1).Value
> > End With
> >