Macro to run based on criteria

  • Thread starter Thread starter puiuluipui
  • Start date Start date
P

puiuluipui

Hi, i need a macro to run based on a criteria in A1.
In A1 i have a dropdown list with sheets name. If i select in A1 the sheet
John, and then i run the macro, i need the macro to copy some cells from the
sheet John.
If i select in A1 the sheet Mary, then the macro to copy from sheet Mary.
Can this be done?
Thanks!
 
Yes. Try the below...




With Sheets(CStr(Range("A1")))
..Range("A1:A10").Copy Sheets("Sheet1").Range("B1")
End With
 
Back
Top