1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

    Yours,
    Chandoo
  2. 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...

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

Discussion in 'VBA Macros' started by PRAVEENBAGWAN, Jul 13, 2017.

  1. PRAVEENBAGWAN

    PRAVEENBAGWAN New Member

    Messages:
    7
    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?

    Attached Files:

  2. vletm

    vletm Well-Known Member

    Messages:
    2,763
    one possible like this

    Attached Files:

    Thomas Kuriakose likes this.
  3. SirJB7

    SirJB7 Excel Rōnin

    Messages:
    8,894
    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 (vb):
    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!
    Thomas Kuriakose likes this.
  4. PRAVEENBAGWAN

    PRAVEENBAGWAN New Member

    Messages:
    7
    Thank you so much sir,
  5. SirJB7

    SirJB7 Excel Rōnin

    Messages:
    8,894
    Hi, PRAVEENBAGWAN!
    Glad you solved it. Welcome back whenever needed or wanted.
    Regards!
  6. PRAVEENBAGWAN

    PRAVEENBAGWAN New Member

    Messages:
    7
    Please share macro for the add button in attached excel sheet to add data range A29:E29 in empty row of "sheet2".

    Attached Files:

  7. vletm

    vletm Well-Known Member

    Messages:
    2,763
  8. PRAVEENBAGWAN

    PRAVEENBAGWAN New Member

    Messages:
    7
    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
  9. PRAVEENBAGWAN

    PRAVEENBAGWAN New Member

    Messages:
    7
    SAME is not working on the sheet.
  10. vletm

    vletm Well-Known Member

    Messages:
    2,763
    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?
  11. PRAVEENBAGWAN

    PRAVEENBAGWAN New Member

    Messages:
    7
    As per your shared VBA CODE, formulaes are getting copied instead of value.
  12. vletm

    vletm Well-Known Member

    Messages:
    2,763
    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!

Share This Page