Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default troubleshoot column formula

i have pasted a fomula in an entire column. the problem is that excel has
become very slow on open and save and i only have 100 records in total. is
there a way not to copy the formula in the entire column but each time a user
enters data in a row the corresponding cell in that row gets the fomula?

your help would be greatly appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default troubleshoot column formula

A Worksheet_Change event macro like this may help:
Private Sub Worksheet_Change(ByVal Target As Range)
Range("E" & Target.Row).FormulaR1C1 = Range("E" & Target.Row -
1).FormulaR1C1
End Sub

It takes the formula from the previous row.
Change "E" to column letter needed!


Regards,
Stefi

angie ezt *rta:

i have pasted a fomula in an entire column. the problem is that excel has
become very slow on open and save and i only have 100 records in total. is
there a way not to copy the formula in the entire column but each time a user
enters data in a row the corresponding cell in that row gets the fomula?

your help would be greatly appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default troubleshoot column formula

where do i have to paste the code? in which menu should i go?


Ο χρήστης "Stefi" *γγραψε:

A Worksheet_Change event macro like this may help:
Private Sub Worksheet_Change(ByVal Target As Range)
Range("E" & Target.Row).FormulaR1C1 = Range("E" & Target.Row -
1).FormulaR1C1
End Sub

It takes the formula from the previous row.
Change "E" to column letter needed!


Regards,
Stefi

angie ezt *rta:

i have pasted a fomula in an entire column. the problem is that excel has
become very slow on open and save and i only have 100 records in total. is
there a way not to copy the formula in the entire column but each time a user
enters data in a row the corresponding cell in that row gets the fomula?

your help would be greatly appreciated!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default troubleshoot column formula

Alt+F11 (VBA)
Right click on worksheet name in the Project Explorer window
Choose View code from the local menu
Copy/Paste code in the code window

Stefi


angie ezt *rta:

where do i have to paste the code? in which menu should i go?


Ο χρήστης "Stefi" *γγραψε:

A Worksheet_Change event macro like this may help:
Private Sub Worksheet_Change(ByVal Target As Range)
Range("E" & Target.Row).FormulaR1C1 = Range("E" & Target.Row -
1).FormulaR1C1
End Sub

It takes the formula from the previous row.
Change "E" to column letter needed!


Regards,
Stefi

angie ezt *rta:

i have pasted a fomula in an entire column. the problem is that excel has
become very slow on open and save and i only have 100 records in total. is
there a way not to copy the formula in the entire column but each time a user
enters data in a row the corresponding cell in that row gets the fomula?

your help would be greatly appreciated!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default troubleshoot column formula

thank you! it works fine! how do i enter the same for another column? (i have
two columns with formulas.

Ο χρήστης "Stefi" *γγραψε:

Alt+F11 (VBA)
Right click on worksheet name in the Project Explorer window
Choose View code from the local menu
Copy/Paste code in the code window

Stefi


angie ezt *rta:

where do i have to paste the code? in which menu should i go?


Ο χρήστης "Stefi" *γγραψε:

A Worksheet_Change event macro like this may help:
Private Sub Worksheet_Change(ByVal Target As Range)
Range("E" & Target.Row).FormulaR1C1 = Range("E" & Target.Row -
1).FormulaR1C1
End Sub

It takes the formula from the previous row.
Change "E" to column letter needed!


Regards,
Stefi

angie ezt *rta:

i have pasted a fomula in an entire column. the problem is that excel has
become very slow on open and save and i only have 100 records in total. is
there a way not to copy the formula in the entire column but each time a user
enters data in a row the corresponding cell in that row gets the fomula?

your help would be greatly appreciated!



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default troubleshoot column formula

Private Sub Worksheet_Change(ByVal Target As Range)
Range("E" & Target.Row).FormulaR1C1 = Range("E" & Target.Row -
1).FormulaR1C1
Range("F" & Target.Row).FormulaR1C1 = Range("F" & Target.Row -
1).FormulaR1C1
Range("G" & Target.Row).FormulaR1C1 = Range("G" & Target.Row -
1).FormulaR1C1
End Sub

Change "E", "F", "G" to column letters needed!

Stefi


angie ezt *rta:

thank you! it works fine! how do i enter the same for another column? (i have
two columns with formulas.

Ο χρήστης "Stefi" *γγραψε:

Alt+F11 (VBA)
Right click on worksheet name in the Project Explorer window
Choose View code from the local menu
Copy/Paste code in the code window

Stefi


angie ezt *rta:

where do i have to paste the code? in which menu should i go?


Ο χρήστης "Stefi" *γγραψε:

A Worksheet_Change event macro like this may help:
Private Sub Worksheet_Change(ByVal Target As Range)
Range("E" & Target.Row).FormulaR1C1 = Range("E" & Target.Row -
1).FormulaR1C1
End Sub

It takes the formula from the previous row.
Change "E" to column letter needed!


Regards,
Stefi

angie ezt *rta:

i have pasted a fomula in an entire column. the problem is that excel has
become very slow on open and save and i only have 100 records in total. is
there a way not to copy the formula in the entire column but each time a user
enters data in a row the corresponding cell in that row gets the fomula?

your help would be greatly appreciated!

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default troubleshoot column formula

Personally, I try to figure out how many rows I'll use and then double it and a
little more <vbg. I wouldn't use the entire column.

But you could use a macro that does the work for you.

David McRitchie shares some code:
http://www.mvps.org/dmcritchie/excel/insrtrow.htm
look for: InsertRowsAndFillFormulas

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

===========
You may want to experiment with lists (xl2003) or tables (xl2007), too.

And although I've never had good luck with this setting:
Tools|Options|Edit tab|"Extend data range formats and formulas"
You may want to see if it works for you.



angie wrote:

i have pasted a fomula in an entire column. the problem is that excel has
become very slow on open and save and i only have 100 records in total. is
there a way not to copy the formula in the entire column but each time a user
enters data in a row the corresponding cell in that row gets the fomula?

your help would be greatly appreciated!


--

Dave Peterson
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
Troubleshoot rwtrader Excel Worksheet Functions 2 June 4th 10 03:49 PM
SUM troubleshoot Dee Excel Discussion (Misc queries) 2 March 8th 10 04:55 AM
Troubleshoot help Whitney Excel Discussion (Misc queries) 3 April 3rd 08 11:03 PM
troubleshoot a workbook for me? [email protected] Excel Discussion (Misc queries) 1 November 22nd 05 07:01 PM
troubleshoot custom Excel Auto Filters when the column is a # or d MEM Excel Worksheet Functions 1 March 8th 05 09:10 PM


All times are GMT +1. The time now is 01:18 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"