Hi,
I have a table on sheet 1 that gets updated when I choose 3 options – opp1, opp2, opp3. I am trying to pull this table onto sheet 2 – where 3 tables of data flow one below the other and get populated when opp1, 2 or 3 are selected. I am trying to write the following macro to achieve that
Sheet 1 – if cell A1 = Opp1 then
[pre]
[/pre]
Secondly, I am also trying to automate it – where by a click of a button I want to be able to run opp1, opp2 and opp3 and get the tables in sheet 2 populated.
Any help would be greatly appreciated!
Thanks!
I have a table on sheet 1 that gets updated when I choose 3 options – opp1, opp2, opp3. I am trying to pull this table onto sheet 2 – where 3 tables of data flow one below the other and get populated when opp1, 2 or 3 are selected. I am trying to write the following macro to achieve that
Sheet 1 – if cell A1 = Opp1 then
[pre]
Code:
Sub CopyPaste()
Worksheets("Sheet 1").Range("J12:N19").Copy
Worksheets("Sheet 2").Range(“H25:L32”).PasteSpecial (xlPasteValues)
End Sub
If not then it should be “0”
Similarly, if cell A1 = Opp2 then
Sub CopyPaste()
Worksheets("Logic").Range("J12:N19").Copy
Worksheets("Output").Range(“H34:L41”).PasteSpecial (xlPasteValues)
End Sub
Secondly, I am also trying to automate it – where by a click of a button I want to be able to run opp1, opp2 and opp3 and get the tables in sheet 2 populated.
Any help would be greatly appreciated!
Thanks!