Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
AJB AJB is offline
external usenet poster
 
Posts: 40
Default cell reference in macro

I have an estimating template which I recorded some macros for. The macros
change several unit rates automatically and re-calculates my bid price.

The problem I am concerned about is that if I add rows, my macro ends up one
row off. I tried naming the cells that change and adding the new names to
the macros, but that is not able to correct the offset caused by adding rows.


1) I would like to be able to safely add rows without messing up all my math

but

2)will settle for a work around that prevents someone from adding rows, if
that is possible.

Any suggestions? Thanks,

Andy
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default cell reference in macro

I'd be happy to help, but could you send me the spreadsheet? Post back here
when you have emailed it. mc19991999 @ hotmail

"AJB" wrote:

I have an estimating template which I recorded some macros for. The macros
change several unit rates automatically and re-calculates my bid price.

The problem I am concerned about is that if I add rows, my macro ends up one
row off. I tried naming the cells that change and adding the new names to
the macros, but that is not able to correct the offset caused by adding rows.


1) I would like to be able to safely add rows without messing up all my math

but

2)will settle for a work around that prevents someone from adding rows, if
that is possible.

Any suggestions? Thanks,

Andy

  #3   Report Post  
Posted to microsoft.public.excel.misc
AJB AJB is offline
external usenet poster
 
Posts: 40
Default cell reference in macro

Unfortunately, the template is proprietary and dumbing it down would take
forever. This is how the macro currently is after I named the cells that
need to change between products.

Range("labor_rate_1").Select
ActiveCell.FormulaR1C1 = "=R[-1]C[5]-0.01"
Range("labor_rate_2").Select
ActiveCell.FormulaR1C1 = "0.8"

Hopefully that make my problem a little clearer?


"Mike" wrote:

I'd be happy to help, but could you send me the spreadsheet? Post back here
when you have emailed it. mc19991999 @ hotmail

"AJB" wrote:

I have an estimating template which I recorded some macros for. The macros
change several unit rates automatically and re-calculates my bid price.

The problem I am concerned about is that if I add rows, my macro ends up one
row off. I tried naming the cells that change and adding the new names to
the macros, but that is not able to correct the offset caused by adding rows.


1) I would like to be able to safely add rows without messing up all my math

but

2)will settle for a work around that prevents someone from adding rows, if
that is possible.

Any suggestions? Thanks,

Andy

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro - How to increment cell reference by one row lau_ash[_2_] Excel Worksheet Functions 7 April 4th 23 02:17 PM
Reference a Macro to perform Cell formula Fred Djinn Holstings Excel Discussion (Misc queries) 1 February 2nd 07 03:50 AM
variable cell reference in a macro [email protected] Excel Discussion (Misc queries) 6 January 25th 07 12:34 AM
Chnaging Cell reference through macro ashish128 Excel Discussion (Misc queries) 7 April 25th 06 01:14 PM
Allowing for variable cell reference in macro tx12345 Excel Worksheet Functions 2 December 24th 05 04:50 AM


All times are GMT +1. The time now is 08:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"