LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 114
Default Apply expression to entire range

Here's an easy one for somebody.

My code currently cycles through a column in a worksheet
and removes unwanted characters, like this:

For Each Cell In mySheet.Range("A2:A" & mySheet.Range
("A65536").End(xlUp).Row)
If Left(Cell, 1) = "=" Or _
Left(Cell, 1) = "-" Or _
Left(Cell, 1) = "+" Or Then
Cell.Value = "'" & Cell.Value
End If
Next Cell

Problem is that if the worksheet has several thousand
records this code could take minutes. Is there a way to
apply this to the entire range at once instead of cycling
the range?

tod


 
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
How do I apply formula to entire column Stephan Excel Discussion (Misc queries) 2 October 1st 06 06:04 PM
HOW DO I APPLY A FORMULA FOR AND ENTIRE ROW? jcpayne Excel Worksheet Functions 2 July 19th 06 06:02 PM
How do I apply my function to the entire column? jsthngn Excel Discussion (Misc queries) 1 January 23rd 06 03:21 PM
I want to apply a formula to an entire column. kitcox Excel Discussion (Misc queries) 3 November 28th 05 01:48 AM
I would like to apply the same calculation to an entire row mnirula Excel Worksheet Functions 3 April 25th 05 10:05 PM


All times are GMT +1. The time now is 01:20 PM.

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

About Us

"It's about Microsoft Excel"