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

How to add today data to a summary using button.

PRAVEENBAGWAN

New Member
I have two sheets in attached sample file.
"today" & "summary"

I have to send data from "today" worksheet to "summary" worksheet on clicking add button. For example in attached sheet, data from "today" sheet to be entered on clicking add button.

how to send data from one sheet to empty row of another sheet?
 

Attachments

  • Book1.xlsx
    10.8 KB · Views: 5
Hi, PRAVEENBAGWAN!

Welcome to Chandoo forums!
Checked this yet?
http://chandoo.org/forum/forums/new-users-please-start-here.14/

About your question, try this code and assign it to the button action:
Code:
Option Explicit

Sub A()
    Dim I As Long
    Worksheets("Sheet2").Select
    I = Range("A6").End(xlDown).Row + 1
    With Worksheets("Sheet1").Range("A7:D7")
        ' copy
        .Copy Worksheets("Sheet2").Range("A" & I)
        ' delete
        .ClearContents
    End With
End Sub
Regards!
 
Please share macro for the add button in attached excel sheet to add data range A29:E29 in empty row of "sheet2".
 

Attachments

  • ACCOUNT - Copy.xlsx
    16.9 KB · Views: 4
Public Sub Copy_Values_Formats_and_Column_Widths()

Dim destCell As Range

Set destCell = Worksheets("Sheet2").Cells(Rows.Count, "A").End(xlUp)
If destCell.Row > 1 Then Set destCell = destCell.Offset(1)

Worksheets("Bagwan Compu Data Entry").Range("A29:E29").Copy

destCell.Worksheet.Select
destCell.Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
destCell.Select

Application.CutCopyMode = False

End Sub



THIS IS NOT WORKING
 
Yes, that would be more than Miracle it #2 would work!
Your samples have some differences!
(above 1st sample and below 2nd sample)
Screen Shot 2017-07-17 at 22.48.04.png
how to send data from one sheet to empty row of another sheet?
 
As I wrote:
Yes, that would be more than Miracle it #2 would work!

Welcome to use VBA.
There have to be just correct (ALL) settings that it would work as a dream!

Did You change my code? if not then it cannot work!
 
Back
Top