Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Macro Help - truncate text

I am working with output from a corporate accounting system. When data is
exported to Excel for Canadian operations the numbers are always represented
as text in the following format C$125.44.

I can't figure out how to quickly convert the data from text to numbers. If
I remove the C then Excel recognizes a number. Is there a fuction that will
remove only the leftmost character of a string? Or must I write a macro that
can do so?

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Macro Help - truncate text

Hi,
To remove the C and get the underlying number:
- Select your column of data
- menu Edit Replace
Find what: C
Replace with: <leave blank

As a result, the entire column should be converted to a number.

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"TheJoneser" wrote:

I am working with output from a corporate accounting system. When data is
exported to Excel for Canadian operations the numbers are always represented
as text in the following format C$125.44.

I can't figure out how to quickly convert the data from text to numbers. If
I remove the C then Excel recognizes a number. Is there a fuction that will
remove only the leftmost character of a string? Or must I write a macro that
can do so?

Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Macro Help - truncate text

Sweet! Didn't even think of that. I also found that the function MID would
accomplish it but only in one cell.

Thanks for your help.

"sebastienm" wrote:

Hi,
To remove the C and get the underlying number:
- Select your column of data
- menu Edit Replace
Find what: C
Replace with: <leave blank

As a result, the entire column should be converted to a number.

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"TheJoneser" wrote:

I am working with output from a corporate accounting system. When data is
exported to Excel for Canadian operations the numbers are always represented
as text in the following format C$125.44.

I can't figure out how to quickly convert the data from text to numbers. If
I remove the C then Excel recognizes a number. Is there a fuction that will
remove only the leftmost character of a string? Or must I write a macro that
can do so?

Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Macro Help - truncate text

You're right, you could use a formula, something like:
Say data is in A2:A100
- in B2: =VALUE(SUBSTITUTE(A2,"C",""))
--- ie, in A2, replace "C" by blank then convert to numeric value
- copy/paste B2 along the data in B2:B100

Regards,
Sébastien
<http://www.ondemandanalysis.com


"TheJoneser" wrote:

Sweet! Didn't even think of that. I also found that the function MID would
accomplish it but only in one cell.

Thanks for your help.

"sebastienm" wrote:

Hi,
To remove the C and get the underlying number:
- Select your column of data
- menu Edit Replace
Find what: C
Replace with: <leave blank

As a result, the entire column should be converted to a number.

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"TheJoneser" wrote:

I am working with output from a corporate accounting system. When data is
exported to Excel for Canadian operations the numbers are always represented
as text in the following format C$125.44.

I can't figure out how to quickly convert the data from text to numbers. If
I remove the C then Excel recognizes a number. Is there a fuction that will
remove only the leftmost character of a string? Or must I write a macro that
can do so?

Thank you.

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
How do I truncate linked text? Jenni Excel Worksheet Functions 1 April 9th 10 07:10 PM
How do you truncate a text string? dailygluttony Excel Worksheet Functions 2 March 28th 06 08:08 PM
Truncate text JAmes Excel Programming 6 April 7th 04 01:18 PM
Truncate text Rob van Gelder[_4_] Excel Programming 0 April 6th 04 09:30 PM
truncate text using VBA Excel maehe Excel Programming 2 November 21st 03 12:58 PM


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