Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default [Quickly!] Removing PrefixCharacter (i.e. leading, hidden apostrop

I used some code I found in the newsgroup to remove the leading, hidden
apostrophe that identifies cell contents as a string data type -- but it's
too slow.

Is there a faster method than the "FOR EACH ... {remove prefix character}
.... NEXT" I'm using?

A common scenario for me is 10 worksheets, each with 200,000 cells of data
each. In addition, there is one column on each tab from which I do NOT want
to remove the prefix character.

I'm not sure search & replace will work for me because I have legit
apostrophes in my data.

Thanks in advance.
David
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default [Quickly!] Removing PrefixCharacter (i.e. leading, hidden apostrop

With rngToFix
.Formula = .Formula
End With
will work with formulas and/or constants. If a lot of formulas, turn calc to
manual first.

With rngToFix
.Value= .Value
End With
for constants

It can take an unterruptable long time if you are doing that against a huge
sheet, so you might want to loop through smaller range areas and run it in
sections..

--
Tim Zych
SF, CA


"David Mueller" wrote in message
...
I used some code I found in the newsgroup to remove the leading, hidden
apostrophe that identifies cell contents as a string data type -- but it's
too slow.

Is there a faster method than the "FOR EACH ... {remove prefix character}
... NEXT" I'm using?

A common scenario for me is 10 worksheets, each with 200,000 cells of data
each. In addition, there is one column on each tab from which I do NOT
want
to remove the prefix character.

I'm not sure search & replace will work for me because I have legit
apostrophes in my data.

Thanks in advance.
David



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default [Quickly!] Removing PrefixCharacter (i.e. leading, hidden apos

Quickly remove the prefix character, as opposed to the cell-by-cell method
which is too slow when workbooks contain 200,000+ cells of data

Or do you mean "how quickly" ... I'd live with a couple minutes considering
it's about 20+ minutes going cell-by-cell.



"Don Guillett" wrote:

What does [Quickly!] mean?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"David Mueller" wrote in message
...
I used some code I found in the newsgroup to remove the leading, hidden
apostrophe that identifies cell contents as a string data type -- but it's
too slow.

Is there a faster method than the "FOR EACH ... {remove prefix character}
... NEXT" I'm using?

A common scenario for me is 10 worksheets, each with 200,000 cells of data
each. In addition, there is one column on each tab from which I do NOT
want
to remove the prefix character.

I'm not sure search & replace will work for me because I have legit
apostrophes in my data.

Thanks in advance.
David



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default [Quickly!] Removing PrefixCharacter (i.e. leading, hidden apostrop

If you have paste space you can remove lead apostrophes nearly
instantaneously.

For example, enter:
'=1+2 in ALL the cells in column A
select the column and copy

Then select the top cell in an un-used column (say column B) and:

Edit PasteSpecial values

You will see that column B replicates the contents of column A except all
the leading apostrophes are gone. If desired, you can copy back onto column
A.


This technique is effective if you have large blocks of apostrophic cells
that can be copy / pasted in this fashion.
--
Gary''s Student - gsnu200751


"David Mueller" wrote:

I used some code I found in the newsgroup to remove the leading, hidden
apostrophe that identifies cell contents as a string data type -- but it's
too slow.

Is there a faster method than the "FOR EACH ... {remove prefix character}
... NEXT" I'm using?

A common scenario for me is 10 worksheets, each with 200,000 cells of data
each. In addition, there is one column on each tab from which I do NOT want
to remove the prefix character.

I'm not sure search & replace will work for me because I have legit
apostrophes in my data.

Thanks in advance.
David



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default [Quickly!] Removing PrefixCharacter (i.e. leading, hidden apos

Wow! That's quick! Thanks.

"Tim Zych" wrote:

With rngToFix
.Formula = .Formula
End With
will work with formulas and/or constants. If a lot of formulas, turn calc to
manual first.

With rngToFix
.Value= .Value
End With
for constants

It can take an unterruptable long time if you are doing that against a huge
sheet, so you might want to loop through smaller range areas and run it in
sections..

--
Tim Zych
SF, CA


"David Mueller" wrote in message
...
I used some code I found in the newsgroup to remove the leading, hidden
apostrophe that identifies cell contents as a string data type -- but it's
too slow.

Is there a faster method than the "FOR EACH ... {remove prefix character}
... NEXT" I'm using?

A common scenario for me is 10 worksheets, each with 200,000 cells of data
each. In addition, there is one column on each tab from which I do NOT
want
to remove the prefix character.

I'm not sure search & replace will work for me because I have legit
apostrophes in my data.

Thanks in advance.
David




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
Removing Leading Spaces Kathleen Hogan Excel Discussion (Misc queries) 7 January 8th 08 11:53 PM
Removing Hyperlinks Quickly Sam B. Excel Discussion (Misc queries) 2 May 3rd 07 03:24 PM
Removing leading/trailing spaces Chuda Excel Discussion (Misc queries) 2 September 12th 06 04:20 PM
Removing leading 0s bnkone Excel Discussion (Misc queries) 2 March 1st 06 08:58 PM
Removing leading spaces jmdaniel Excel Programming 3 November 3rd 04 08:53 PM


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