Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Using Filters in Macros
I am recording a macro which copies a cell and then pastes it as a criteria
for an autofilter. However, the macro records the exact name of the cell value I have pasted. I would like the macro to copy and paste whatever is in that cell, not the exact name. Any ideas? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Using Filters in Macros
Let me see if I understand your problem? You recorded a macro and maybe the
code in it looks like this: Range("F5").Select Selection.Copy Range("C3").Select ActiveSheet.Paste So every time it runs you are always copying the contents of cell F5 to C3, but you need to copy what is in the current cell you have selected to use. If that's the case, just delete that first line of code Range("F5").Select from the code, then it will take what ever cell is currently selected and use it to perform the paste into cell C3. To modify the code, use Tools | Macro | Macros and then choose the name of the macro in question and click the [Edit] button, make your changes and close the VB Editor. Hope this helps. "Plum" wrote: I am recording a macro which copies a cell and then pastes it as a criteria for an autofilter. However, the macro records the exact name of the cell value I have pasted. I would like the macro to copy and paste whatever is in that cell, not the exact name. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Filters in Macros | Excel Discussion (Misc queries) | |||
Hide Macro's in Toolbar / Macro's list | Excel Discussion (Misc queries) | |||
Suggested new functionalities for Filters, Pivots and other issues | Excel Discussion (Misc queries) | |||
Suggested new functionalities for Filters, Pivots and other issues | Excel Discussion (Misc queries) | |||
how do I run excel 4.0 macros on excel 2000 | Excel Discussion (Misc queries) |