From: puiuluipui on
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!
From: Jackpot on
Yes. Try the below...




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


"puiuluipui" wrote:

> 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!
From: puiuluipui on
This is perfect!
Thanks!

"Jackpot" wrote:

> Yes. Try the below...
>
>
>
>
> With Sheets(CStr(Range("A1")))
> .Range("A1:A10").Copy Sheets("Sheet1").Range("B1")
> End With
>
>
> "puiuluipui" wrote:
>
> > 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!