• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

code for copying till last row

Hi,


Now can we modify it to accommodate additional requirements.


It should copy from Raw and paste in sheet1 till last row (we don’t need Sre. No this time)


Now it should calculate sheet1 rows :-

  1. If sheet1 rows are less, then it should create additional rows to fit it Raw sheet data and total at last.

  2. If sheet1 rows are more, then it should delete additional rows and total at last.

Thanks for your guidance as always
 

Attachments

  • Net.xlsm
    16.8 KB · Views: 0
Hello Veeru... Everyone in this forum spending their personal time in solving questions.

Please always be clear with you project and requirements...Since 1st post we are doing the same coding with small changes..

Can u give us complete picture....Happy to help u.
 
Hi Monty,


Sorry for the multiple questions and I really appreciate time spend by you and others in solving queries and questions but these are not hypothetical situations.


I am working on one report and I encountered with these situations.


We are left with the last situation which I have mentioned above.


If we able to produce it then I am done with my report.


Looking forward to your assistance on the same.


Thanks
 
Code:
Sub Demo()
Dim LR As Long
Worksheets("Raw").Select
Range("A1").Select: Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Copy
Worksheets("Sheet1").Select
Range("A1").PasteSpecial
LR = Range("D" & Rows.Count).End(xlUp).Row
Range("D" & LR + 1).Formula = "=sum(D2:D" & LR & ")"
MsgBox "Completed"
End Sub
 
Above is the code which we develop earlier....it is working fine but what we need is copying and pasting from Raw to Sheet1 Col. A and Col. B only...Please suggest something on this....
 
Back
Top