Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Cell Calculation taking to long

I have a macro on which I use the following code:

ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],CATALOG,5,FALSE)"
Columns("E:E").Select
Selection.NumberFormat = "$#,##0.00"
Range("D2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range("D2:E2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown

How can I get it to only fill down to where the adjacent column to the left
has data in it? Is there a piece of code that I can use to do this? Right
now it is taking approx. 2 min. to fill down and calculate.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Cell Calculation taking to long

Emma, if I follow you:

Dim CountData&
Application.Calculation = xlCalculationManual
CountData = ActiveSheet.Cells(Rows.Count, "C").End(xlUp).Row
Range(Cells(2, 4), Cells(CountData, 5)).Select
Range(Cells(2, 4), Cells(CountData, 5)) =
"=VLOOKUP(RC[-3],CATALOG,5,FALSE)"
Selection.NumberFormat = "$#,##0.00"
Application.Calculation = xlCalculationAutomatic

HTH--Lonnie M.

P.S. VLOOKUP's can be slow in and of themselves, but turning the
calculation to manual should help speed up the filling of the cells.

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
excel to pdf taking too long in 2007 Milind Keer[_2_] Excel Discussion (Misc queries) 1 February 23rd 10 08:05 PM
Excel to PDF taking too long Milind Keer[_2_] Excel Discussion (Misc queries) 1 February 23rd 10 06:38 PM
calculation taking too long yowzers Excel Worksheet Functions 8 December 15th 09 11:25 PM
taking a long list of duplicates... DFrank Excel Discussion (Misc queries) 4 June 27th 08 10:21 PM
Problem with formula - Taking too long for calculation Shashi Bhosale Excel Programming 2 September 9th 03 07:14 PM


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