Re: Pasting Blanks using a macro
- From: "Norman Jones" <normanjones@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 16 Aug 2005 16:37:03 +0100
Hi TTomSawyer.
Correcting qualification errors, again on a copy, try:
Sub Tester02()
Dim rng As Range
Dim rng2 As Range
Dim ws1 As Work***
Dim ws2 As Work***
Application.ScreenUpdating = False
Set ws1 = Sheets("MASTER Pettycash and CC")
Set ws2 = Sheets("PETTY CASH INPUT")
With ws1
.Range(.Range("B7"), .Range("B7"). _
End(xlDown)).Offset(0, -1).Resize(, 2).Copy
End With
With ws2
.Range("Y6").PasteSpecial _
Paste:=xlValues, _
Operation:=xlNone, _
SkipBlanks:=True, _
Transpose:=False
.Range("C154:K185").Copy
Set rng = ws1.Columns("B")
Set rng2 = rng.Find(What:="*", _
After:=rng.Cells(rng.Cells.Count), _
LookIn:=xlValues, _
SearchDirection:=xlPrevious).Offset(0, -1)
Set rng2 = Nothing
Set rng2 = rng.Find(What:="*", _
After:=rng.Cells(rng.Cells.Count), _
LookIn:=xlValues, _
SearchDirection:=xlPrevious).Offset(0, -1)
.Range("C154:K185").Copy
rng2.PasteSpecial Paste:=xlValues, _
Operation:=xlNone, _
SkipBlanks:=True, _
Transpose:=False
End With
With ws1
.Range(.Range("B7"), .Range("B7"). _
End(xlDown)).Offset(0, -1).Resize(, 2).Copy
End With
With ws2
.Range("AA6").PasteSpecial _
Paste:=xlValues, _
Operation:=xlNone, _
SkipBlanks:=True, _
Transpose:=False
.Range("C4").ClearContents
.Range("B6:F37").ClearContents
End With
Application.ScreenUpdating = False
End Sub
'<<=========================
---
Regards,
Norman
"TTomSawyer" <TTomSawyer.1tv4al_1124204789.1909@xxxxxxxxxxxxxxxxxxxxx> wrote
in message news:TTomSawyer.1tv4al_1124204789.1909@xxxxxxxxxxxxxxxxxxxxxxxx
>
> Hrm,
> this didnt work, it resulted in a few errors.
> specifically regarding the line with
>
>
> ws1.Range("B7", Range("B7"). _
> End(xlDown)).Offset(0, -1).Resize(, 2).Copy
>
>
> --
> TTomSawyer
> ------------------------------------------------------------------------
> TTomSawyer's Profile:
> http://www.excelforum.com/member.php?action=getinfo&userid=20511
> View this thread: http://www.excelforum.com/showthread.php?threadid=395945
>
.
- References:
- Pasting Blanks using a macro
- From: TTomSawyer
- Re: Pasting Blanks using a macro
- From: Norman Jones
- Re: Pasting Blanks using a macro
- From: TTomSawyer
- Pasting Blanks using a macro
- Prev by Date: Text box linked to excel
- Next by Date: Look up *** name determined in cell
- Previous by thread: Re: Pasting Blanks using a macro
- Next by thread: Declarations variables, Dim, some guidance please
- Index(es):