Re: vba looping for blank cells
- From: "BeJay" <bevkeift@xxxxxxxxxxx>
- Date: 3 Jun 2006 05:27:27 -0700
hey bondi, thanks.. that works almost perfect, but the value needs to
be moved into the blank space above not below - if you get my drift
i.e
30
a 10
a 20
60
b 10
b 20
b 30
can I use the same code as a basis to do this. I know the offset
affects which column but wouldn't know how to find the next row up
rather than the next row down. thankyou for your help with this, BevJ
Bondi wrote:
Hi,
I not sure what you are looking for but this code will take the number
in column C and place it in the first empty cell in column A.
Private Sub CommandButton1_Click()
Dim i
For i = 1 To 20
If Cells(i, 3) <> vbEmpty Then
Cells(i, 3).Offset(1, -2).Value = Cells(i, 3).Value
End If
Next i
End Sub
Regards,
Bondi
.
- Follow-Ups:
- Re: vba looping for blank cells
- From: Don Guillett
- Re: vba looping for blank cells
- References:
- vba looping for blank cells
- From: BeJay
- Re: vba looping for blank cells
- From: Bondi
- vba looping for blank cells
- Prev by Date: Re: Excel File Size Issues
- Next by Date: Re: Getting rid of #DIV/0!
- Previous by thread: Re: vba looping for blank cells
- Next by thread: Re: vba looping for blank cells
- Index(es):