ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Relative cells in macro - and pasting a formula too. (https://www.excelbanter.com/excel-programming/354143-relative-cells-macro-pasting-formula-too.html)

No Name

Relative cells in macro - and pasting a formula too.
 
Hi all

Thanks for reading this. I'm new to macros, so be gentle with me!
I posted this in excel.misc a couple of hours ago without a response so I am
trying here. Sorry, but I should have cross-posted.
Help!
I have recorded a macro to import a file and run a couple of jobs on it.
When I look at the macro, it is written with relative references (like
[RC]-2 and stuff). Is there any way of changing it so that I can understand
it (like H3)?
Also , I have written a complex formula which I want the macro to paste into
a cell - to save having to retype it. The problem is that when I record the
macro, the pasting of the formula into the cell becomes 'ActiveSheet.paste'
rather than pasting the actual formula into the cell.

Cheers.



Bernie Deitrick

Relative cells in macro - and pasting a formula too.
 
Andy,

See my reply in excel.misc - and please don't cross-post in the future.

Bernie
MS Excel MVP


<Andy wrote in message ...
Hi all

Thanks for reading this. I'm new to macros, so be gentle with me!
I posted this in excel.misc a couple of hours ago without a response so I am trying here. Sorry,
but I should have cross-posted.
Help!
I have recorded a macro to import a file and run a couple of jobs on it.
When I look at the macro, it is written with relative references (like
[RC]-2 and stuff). Is there any way of changing it so that I can understand
it (like H3)?
Also , I have written a complex formula which I want the macro to paste into
a cell - to save having to retype it. The problem is that when I record the
macro, the pasting of the formula into the cell becomes 'ActiveSheet.paste'
rather than pasting the actual formula into the cell.

Cheers.





All times are GMT +1. The time now is 01:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com