Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to run based on criteria
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to run based on criteria
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! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to run based on criteria
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to add numbers based on set criteria | Excel Discussion (Misc queries) | |||
macro to delete a row based on criteria | Excel Programming | |||
Macro to hide rows based on criteria | Excel Programming | |||
offset macro based on multiple criteria | Excel Discussion (Misc queries) | |||
Macro to auto Name a Range based on criteria | Excel Programming |