A
alpine7411
I am working on a program for excel that when finished will copy data
(with formulas) from sheet1 (I have it labled Items) to the next
avaliable blank cell in sheet 2 (I have it labeled Estimate). I am
using a checkbox on the items i have listed on sheet1, so that when
checked, the assigned info (on sheet1) is copied into designated areas
on sheet2. An example: When I select copper piping 1/2" on sheet1. I
want it to go in the first empty cell under the heading "plumbing" on
sheet2. When I select copper piping 3/4" next on sheet1. I want it to
go under copper piping 1/2" now on sheet two. And so on. Also when I
select lights on sheet1. I want it to go in the first empty cell under
the heading "electrical" on sheet2.
My code so far is:
Sub Test3()
Application.ScreenUpdating = False
If Range("B7") = True Then Range("C7:G7").Select
Selection.Copy
Sheets("Estimate").Select
Range("B16:F16").Select
ActiveSheet.Paste
Range("A1").Select
Sheets("Items").Select
Range("A2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = ""
Range("A3").Select
End Sub
I have it now where each item on sheet1 is assigned a range on sheet2.
I will not use all items on sheet1 at the sametime so I want the items
to paste onto sheet2 in the order I select them under there designated
headings.
I was thinking of using an "If" statement: If cell B15 is occupied then
look in cell B16. If that is occupied look in cell B17. If not occupied
then paste. I'm not sure how the code would look. I tried several
things but kept getting errors. Is there a simplier way to do this? Or
am I way off base?
If you need more information or clarification let me know.
Thanks,
Keith
(with formulas) from sheet1 (I have it labled Items) to the next
avaliable blank cell in sheet 2 (I have it labeled Estimate). I am
using a checkbox on the items i have listed on sheet1, so that when
checked, the assigned info (on sheet1) is copied into designated areas
on sheet2. An example: When I select copper piping 1/2" on sheet1. I
want it to go in the first empty cell under the heading "plumbing" on
sheet2. When I select copper piping 3/4" next on sheet1. I want it to
go under copper piping 1/2" now on sheet two. And so on. Also when I
select lights on sheet1. I want it to go in the first empty cell under
the heading "electrical" on sheet2.
My code so far is:
Sub Test3()
Application.ScreenUpdating = False
If Range("B7") = True Then Range("C7:G7").Select
Selection.Copy
Sheets("Estimate").Select
Range("B16:F16").Select
ActiveSheet.Paste
Range("A1").Select
Sheets("Items").Select
Range("A2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = ""
Range("A3").Select
End Sub
I have it now where each item on sheet1 is assigned a range on sheet2.
I will not use all items on sheet1 at the sametime so I want the items
to paste onto sheet2 in the order I select them under there designated
headings.
I was thinking of using an "If" statement: If cell B15 is occupied then
look in cell B16. If that is occupied look in cell B17. If not occupied
then paste. I'm not sure how the code would look. I tried several
things but kept getting errors. Is there a simplier way to do this? Or
am I way off base?
If you need more information or clarification let me know.
Thanks,
Keith