Excel macro to copy cell content highlighted

Closed
manrick Posts 3 Registration date Wednesday March 4, 2009 Status Member Last seen March 5, 2009 - Mar 5, 2009 at 03:31 AM
manrick Posts 3 Registration date Wednesday March 4, 2009 Status Member Last seen March 5, 2009 - Mar 5, 2009 at 04:12 AM
Hello,
I am trying write a macro assigned to a button that copies the content of a cell into highlighted cells.

Please can anyone suggest a solution
thx
Manny
Related:

3 responses

Tweedledum Posts 181 Registration date Monday January 19, 2009 Status Member Last seen April 2, 2009 125
Mar 5, 2009 at 03:41 AM
I am no excel expert but

ActiveSheet.Range("the cell you want to copy eg: A5 ").CurrentRegion.Select
Selection.Copy


ActiveSheet.Range("the cell you want to past to eg: B10 ").CurrentRegion.Select

Selection.Paste

the part about the highlighted cells I am not so sure, but this will do it if you always know where you are pasting to. This is at least a good start, someone else might help you with the other part or you might find it, id suggest recording a macro of selecting a cell for that syntax and then you could mess with it for the desired effect. Sorry I couldnt be more help
3
epsiman Posts 306 Registration date Tuesday November 18, 2008 Status Member Last seen February 2, 2010 162
Mar 5, 2009 at 03:51 AM
Can you me more explicite please, I can't help you with that much info
1
manrick Posts 3 Registration date Wednesday March 4, 2009 Status Member Last seen March 5, 2009
Mar 5, 2009 at 04:12 AM
Hi epsiman

I am manually highlighting a range of cells and want to copy the data from a separate cell into each of the highlighted. I would like to do this via a button assigned to a macro because it is a task that I need to repeat over and over again

Hope I am clearer in what I need to do.

Manny
0
manrick Posts 3 Registration date Wednesday March 4, 2009 Status Member Last seen March 5, 2009
Mar 5, 2009 at 03:51 AM
Thanks Tweedledum
That at least gives me a start

Manny
0