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

copy one row, multiple columns of data to next blank row

jcalvacca

Member
Hello all,

I apologize if this was covered somewhere else and I failed to find it.

So on "MASTER" worksheet, I have 3 columns of data (A,B,C).....

Data will be filled out in cells A1, B1, C1 on "MASTER"

I need this data then to be entered on sheet "HISTORY", and have the value in A1 go to the first blank line in column A, B1 into blank on column B, etc etc.

Pretty sure this will have to be a Macro for this to work that will be clicked when the numbers are in the right cells....Thanks in advance for the assistance on this!!
 

jcalvacca

Member
Hi !

your sample does not reflect your initial post :
no HISTORY & MASTER worksheets !
I am aware.....my sheets have changed since my original.....not sure what to do in this instance for forum purposes.

But assistance on the attached file would be helpful....thanks!
 

jcalvacca

Member
@jcalvacca
Hmm ... don't worry, it's easier to give as answer.
Did You mean something like this?
Follow instructions!
I love it!

I tried it on my actual file and got it to work partially....

So it copied over the formulas and not the value...
The "4 cells" are coming from a different spot in the workbook...

So I guess if it copies over the values (maybe) from those 4 cells to the desired columns and then keeps the formulas in the original 4 cells in tact than its perfect.....thanks again!!!
 
Last edited:

vletm

Excel Ninja
@jcalvacca
As I wrote, it's easier to give an (not as) answer.
You give almost all freedom to do code for You.
You asked to copy something 4 to somewhere.
Check that code and modify it as You want.
 

Marc L

Excel Ninja
jcalvaccca, not sure to copy your need (unclear) so maybe this :​
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Intersect([G2:J2], Target) Is Nothing Then Exit Sub
'    AD = Filter(Evaluate("IF(G4:J4="""",ADDRESS(4,COLUMN(G4:J4),4))"), False, False)
'    If UBound(AD) > -1 Then Beep: Range(AD(0)).Select: Exit Sub
     R& = Cells(Rows.Count, 1).End(xlUp)(2).Row
    Cells(R, 1).Resize(, 4).Value = [G4:J4].Value
'    [I4:J4].ClearContents:  [I4].Select
     With ActiveWindow
     If R >= .VisibleRange.Rows(.VisibleRange.Rows.Count).Row Or R < .VisibleRange.Row Then .ScrollRow = R - 1
    End With
End Sub
Do you like it ? So thanks to click on bottom right Like !
 

adams

New Member
I would like to do something similar, but I have 7 values on one line that are being updated from a MySQL database in columns A-G. Header in row one and values in row 2. When Column C changes, I would like row 2 to be appended to the history data in columns A to G starting at line 6 and appending a line below that anytime C2 changes, So it should do it automatically based on when the data in cell C2 changes, not require me to push a button to copy the data down.
 

Attachments

vletm

Excel Ninja
adams
As a new member, You should reread Forum Rules
Seems that You have already missed few basic rules.
After You've reread those, You'll know the right way to continue.
 
Top