-1

Please go download my problem file by this link - https://drive.google.com/file/d/0B2n3BIKH9iL5bFhiNjZid3YzLVE/edit?usp=sharing

The problem is that when I click the copy that time only copy 26 ROW where my data was shown 38 ROW. I can't find why this kind of problem arises

Sub CopyPaste()

Sheets("List").Range("AG3:AG" & Sheets("List").Range("A65536").End(xlShiftUp).Row).SpecialCells(xlCellTypeVisible).Copy
Sheets("List").Range("J3").PasteSpecial xlPasteValuesAndNumberFormats

Application.CutCopyMode = False

End Sub
2
  • 2
    It is best if you present the code here.
    – suspectus
    Apr 8, 2014 at 9:35
  • 1
    If you edit your post and place your code in the post - it will aid readers thanks.
    – suspectus
    Apr 8, 2014 at 9:40

1 Answer 1

0

Change the copy from

Sheets("List").Range("AG3:AG" & Sheets("List").Range("A65536").End(xlShiftUp).Row).SpecialCells(xlCellTypeVisible).Copy

to

Sheets("List").Range("AG3:AG" & Sheets("List").Range("AG65536").End(xlShiftUp).Row).SpecialCells(xlCellTypeFormulas, xlNumbers).Copy

Modifications 1- Changed A65536 to AG65536. Checking wrong column, unless it was intentional. Beacuase of this it is always returning 26 rows. 2- Change your SpecialCells criteria to look for Numbers in AG formulas.

1
  • i have make problem in here "Modifications 1- Changed A65536 to AG65536" i just need only visible Number, not Formulas Thanks Bro.
    – Minhaz
    Apr 8, 2014 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.