ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need an auto update formula macro (https://www.excelbanter.com/excel-programming/353264-need-auto-update-formula-macro.html)

foxspirit

Need an auto update formula macro
 

Here's the sheet.

cell A40=SUM(E41:*E54*)
cell C43=SUM(*E55*:E80)
cell I45=current #
cell I47=prior #

I want to be able to run a macro that will do in this ORDER the
following logical steps:

If I47 = I45
then updated A40's formula to "=sum(E41:*E55*)"
then update C43's formula to "=sum(*E56*:E80)
Else copy I45's # and paste into I47
then updated A40's formula to "=sum(E41:*E55*)"
then update C43's formula to "=sum(*E56*:E80)

Basically its just moving the cell ranges forward one for me as shown
by the bolding. Anybody know how I can do this?


--
foxspirit
------------------------------------------------------------------------
foxspirit's Profile: http://www.excelforum.com/member.php...o&userid=31264
View this thread: http://www.excelforum.com/showthread...hreadid=512253


foxspirit[_2_]

Need an auto update formula macro
 

Is it possible to refer to the cells by cell name (lets say I name A40
Bob) when doing this so it doesn't matter if I move cell A40 to D5,
because the macro will search for its name "Bob" instead?


--
foxspirit
------------------------------------------------------------------------
foxspirit's Profile: http://www.excelforum.com/member.php...o&userid=31264
View this thread: http://www.excelforum.com/showthread...hreadid=512253


foxspirit[_3_]

Need an auto update formula macro
 

How about this...could somebody just tell me how to write code that
refers to a named cell. I want my code to know use Bob like you would
use a static cell reference. How do you declare that? Am I making no
sense? I apologize because I'm just starting out and learning as I go.


--
foxspirit
------------------------------------------------------------------------
foxspirit's Profile: http://www.excelforum.com/member.php...o&userid=31264
View this thread: http://www.excelforum.com/showthread...hreadid=512253



All times are GMT +1. The time now is 09:40 PM.

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