how do i cange the code so that it also pulls the BOUGHT FROM and the COST IN down with it?
Study the pattern of this code. I've re-arranged the lines to make it the order more clear. Replace the relevant section of button code with this and add to / modify per your needs.
With Me
.Range("D" & ActiveCell.Row).Offset(1, 0).EntireRow.Insert shift:=xlDown
.Cells(ActiveCell.Row, 2).Offset(1, 0).Value = Cells(ActiveCell.Row, 10).Value
.Cells(ActiveCell.Row, 3).Offset(1, 0).Value = Cells(ActiveCell.Row, 3).Value
.Cells(ActiveCell.Row, 4).Offset(1, 0).Value = Cells(ActiveCell.Row, 4).Value
.Cells(ActiveCell.Row, 5).Offset(1, 0).Value = Cells(ActiveCell.Row, 5).Value
.Cells(ActiveCell.Row, 10).Offset(1, 0).FormulaR1C1 = "=RC[-8]-RC[-2]"
.CommandButton1.Visible = False
End With
Sorry from what i can gather, there has to be a date for the generate button to work but because i dont want to pull the date (column A) down, how do i change that to something like column C?
This is not clear to me. Are you say there must be a valid date before running "generate"? Please clarify what you mean. At the moment, there is no check for a date entry, so code will run.
Bookmarks