B
balan_radu2003
Hello,
So I have a table with some Lines and some Columns. I am filling this
Lines and Columns with the help of a form that is opening when I am
pressing a Button. Every time I press the Button "ADD" on the Form new
lines with the info from the form are inserted in the table. The
Header Columns of the Table is: Pizza, Type, extra topping, size,
Sauce. Price. What I want to do is a summarize on sheet 2. So that I
will have a copy of this table from sheet1 with more columns in just 2
columns on sheet 2. So "Pizza, Type, extra topping, size, Sauce"
should be copied into the first Column on sheet 2 and the Price should
be copied in the second column in the right of column 1 on sheet2. The
code should automatically check all the lines of the table and copy
all to sheet2 not only the first line of the table.
Example:
Column1 Column2 Column3 Column4 Column5 Column6
Pizza, ----- Type,-- extra topping, size, Sauce ---- price
quatro ----- stagioni --- cheese ---- big ---- no sauce ---- 20$
Should get on sheet 2:
--------------Column1 ----------------------------------- Column 2
"quatro big + stagioni + big + no sauce" ------ 20$
The current code is made like this for the form:
Private Sub cmdADD_Click()
ActiveWorkbook.Sheets("Sheet1").Activate
Range("A3").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = cboPizza.Value
ActiveCell.Offset(0, 1) = txtType.Value
ActiveCell.Offset(0, 2) = cboExtratopping.Value
etc etc....
I would like to have something like this with a referential cell like
A3 on Sheet2. like I have the A3 cell for the first sheet.
Thank you very much
So I have a table with some Lines and some Columns. I am filling this
Lines and Columns with the help of a form that is opening when I am
pressing a Button. Every time I press the Button "ADD" on the Form new
lines with the info from the form are inserted in the table. The
Header Columns of the Table is: Pizza, Type, extra topping, size,
Sauce. Price. What I want to do is a summarize on sheet 2. So that I
will have a copy of this table from sheet1 with more columns in just 2
columns on sheet 2. So "Pizza, Type, extra topping, size, Sauce"
should be copied into the first Column on sheet 2 and the Price should
be copied in the second column in the right of column 1 on sheet2. The
code should automatically check all the lines of the table and copy
all to sheet2 not only the first line of the table.
Example:
Column1 Column2 Column3 Column4 Column5 Column6
Pizza, ----- Type,-- extra topping, size, Sauce ---- price
quatro ----- stagioni --- cheese ---- big ---- no sauce ---- 20$
Should get on sheet 2:
--------------Column1 ----------------------------------- Column 2
"quatro big + stagioni + big + no sauce" ------ 20$
The current code is made like this for the form:
Private Sub cmdADD_Click()
ActiveWorkbook.Sheets("Sheet1").Activate
Range("A3").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = cboPizza.Value
ActiveCell.Offset(0, 1) = txtType.Value
ActiveCell.Offset(0, 2) = cboExtratopping.Value
etc etc....
I would like to have something like this with a referential cell like
A3 on Sheet2. like I have the A3 cell for the first sheet.
Thank you very much