#1   Report Post  
Posted to microsoft.public.excel.misc
RA RA is offline
external usenet poster
 
Posts: 53
Default Formula

I have a spreadsheet in which I have formulae in some cells in one single
row. I want to apply those formulae to all the subsequent rows in the
worsheet, so that when I type a number in the cell it will automatically give
me the result. In addition, I want to be able to hide those formulae.

Please can you help.






  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Formula

You can do this with a worksheet_change event macro in your sheet module.
Here's one I did a few days ago.

Private Sub Worksheet_Change(ByVal Target As Range)
mv = Target
Application.EnableEvents = False
Target.Formula = "=offset(a1," & mv & ",2)"
Application.EnableEvents = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ra" wrote in message
...
I have a spreadsheet in which I have formulae in some cells in one single
row. I want to apply those formulae to all the subsequent rows in the
worsheet, so that when I type a number in the cell it will automatically
give
me the result. In addition, I want to be able to hide those formulae.

Please can you help.







  #3   Report Post  
Posted to microsoft.public.excel.misc
RA RA is offline
external usenet poster
 
Posts: 53
Default Formula

Hi Don

Many thanks for your help. I am a new user to Excel and am not sure how to
install the macro. Please could you help me.

Many thanks

"Don Guillett" wrote:

You can do this with a worksheet_change event macro in your sheet module.
Here's one I did a few days ago.

Private Sub Worksheet_Change(ByVal Target As Range)
mv = Target
Application.EnableEvents = False
Target.Formula = "=offset(a1," & mv & ",2)"
Application.EnableEvents = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ra" wrote in message
...
I have a spreadsheet in which I have formulae in some cells in one single
row. I want to apply those formulae to all the subsequent rows in the
worsheet, so that when I type a number in the cell it will automatically
give
me the result. In addition, I want to be able to hide those formulae.

Please can you help.








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



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

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"