Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dan Wilson
 
Posts: n/a
Default Strange Format changes

Good day. I am using Excel 2002 with Windows ME. I have
a worksheet that contains product costs supplied to me by
my vendor in the following format;

$1.00 (US)
$12.00 (US)
$123.00 (US)
$1234.00 (US)

I have inserted two columns, one to contain a fomula and
the other to copy the formula results into.

The first column contains the formula shown below to
extract the " (US)" from each of the costs.

=LEFT(C2,SEARCH(" ",C2,1))

This appears to work although it does leave a single space
character behind the actual product cost. The worksheet
contains almost 300 different products and the cost for
each one.

After executing the formula shown above, I then copy the
entire column into the second column using Paste Special
and selecting Values. This appears to work also and
leaves me with the product cost with a left-justified
value with a dollar sign and a single space behind the
cost. Eventually I would like to get rid of the space.
Both of the new columns are formatted as Currency with 2
decimal places.

All appears to be OK. However, if I double-click any
single value in the second column and then click any other
cell, the value in the double-clicked cell loses its
currency formatting and changes to number format. This
loses the dollar sign and the value changes from left-
justified to right-justified. Also, if the value contains
a zero or a double zero as part of the cents value, that
zero is no longer shown even though the number format
calls for 2 decimal places.

I am at a loss on this one. If anyone has any
suggestions, please forward them. I could also some
advice on how to get rid of the space between the cost and
the "(US)".

Thanks, Danno...
  #2   Report Post  
Ernst Guckel
 
Posts: n/a
Default

Try this to strip the (US):

=INT(LEFT(A1,LEN(A1)-5))

Ernst.


"Dan Wilson" wrote:

Good day. I am using Excel 2002 with Windows ME. I have
a worksheet that contains product costs supplied to me by
my vendor in the following format;

$1.00 (US)
$12.00 (US)
$123.00 (US)
$1234.00 (US)

I have inserted two columns, one to contain a fomula and
the other to copy the formula results into.

The first column contains the formula shown below to
extract the " (US)" from each of the costs.

=LEFT(C2,SEARCH(" ",C2,1))

This appears to work although it does leave a single space
character behind the actual product cost. The worksheet
contains almost 300 different products and the cost for
each one.

After executing the formula shown above, I then copy the
entire column into the second column using Paste Special
and selecting Values. This appears to work also and
leaves me with the product cost with a left-justified
value with a dollar sign and a single space behind the
cost. Eventually I would like to get rid of the space.
Both of the new columns are formatted as Currency with 2
decimal places.

All appears to be OK. However, if I double-click any
single value in the second column and then click any other
cell, the value in the double-clicked cell loses its
currency formatting and changes to number format. This
loses the dollar sign and the value changes from left-
justified to right-justified. Also, if the value contains
a zero or a double zero as part of the cents value, that
zero is no longer shown even though the number format
calls for 2 decimal places.

I am at a loss on this one. If anyone has any
suggestions, please forward them. I could also some
advice on how to get rid of the space between the cost and
the "(US)".

Thanks, Danno...

  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

=INT(LEFT(A1,LEN(A1)-5))


What if the entry is $1.50 (US) ?

More robust:

=--SUBSTITUTE(A1," (US)","")

Format as CURRENCY.

Biff

-----Original Message-----
Try this to strip the (US):

=INT(LEFT(A1,LEN(A1)-5))

Ernst.


"Dan Wilson" wrote:

Good day. I am using Excel 2002 with Windows ME. I

have
a worksheet that contains product costs supplied to me

by
my vendor in the following format;

$1.00 (US)
$12.00 (US)
$123.00 (US)
$1234.00 (US)

I have inserted two columns, one to contain a fomula

and
the other to copy the formula results into.

The first column contains the formula shown below to
extract the " (US)" from each of the costs.

=LEFT(C2,SEARCH(" ",C2,1))

This appears to work although it does leave a single

space
character behind the actual product cost. The

worksheet
contains almost 300 different products and the cost for
each one.

After executing the formula shown above, I then copy

the
entire column into the second column using Paste

Special
and selecting Values. This appears to work also and
leaves me with the product cost with a left-justified
value with a dollar sign and a single space behind the
cost. Eventually I would like to get rid of the

space.
Both of the new columns are formatted as Currency with

2
decimal places.

All appears to be OK. However, if I double-click any
single value in the second column and then click any

other
cell, the value in the double-clicked cell loses its
currency formatting and changes to number format. This
loses the dollar sign and the value changes from left-
justified to right-justified. Also, if the value

contains
a zero or a double zero as part of the cents value,

that
zero is no longer shown even though the number format
calls for 2 decimal places.

I am at a loss on this one. If anyone has any
suggestions, please forward them. I could also some
advice on how to get rid of the space between the cost

and
the "(US)".

Thanks, Danno...

.

  #4   Report Post  
RagDyeR
 
Posts: n/a
Default

First of all, your formula that's doing the extracting is a text formula,
that is returning Text, *not* true numbers.
Just look in the formula bar.
If you see dollar signs there, you know it's not a true number.

Since you already have a "helper" column formatted to Currency with 2
decimal places, there's no need for the column that contains the extraction
formula to be formatted, since it's only a mid-point on the road to the
final, properly formatted, final column.

Just revise your formula to this:

=--LEFT(C2,SEARCH(" ",C2,1))

And don't worry about trailing spaces, they'll disappear automatically,
together with the dollar signs.
That double unary will return *true* numbers, which, when you copy the
"values" over to the Currency pre-formatted "helper" column, will give you
*true* numbers, displayed in the format that you chose.


--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"Dan Wilson" wrote in message
...
Good day. I am using Excel 2002 with Windows ME. I have
a worksheet that contains product costs supplied to me by
my vendor in the following format;

$1.00 (US)
$12.00 (US)
$123.00 (US)
$1234.00 (US)

I have inserted two columns, one to contain a fomula and
the other to copy the formula results into.

The first column contains the formula shown below to
extract the " (US)" from each of the costs.

=LEFT(C2,SEARCH(" ",C2,1))

This appears to work although it does leave a single space
character behind the actual product cost. The worksheet
contains almost 300 different products and the cost for
each one.

After executing the formula shown above, I then copy the
entire column into the second column using Paste Special
and selecting Values. This appears to work also and
leaves me with the product cost with a left-justified
value with a dollar sign and a single space behind the
cost. Eventually I would like to get rid of the space.
Both of the new columns are formatted as Currency with 2
decimal places.

All appears to be OK. However, if I double-click any
single value in the second column and then click any other
cell, the value in the double-clicked cell loses its
currency formatting and changes to number format. This
loses the dollar sign and the value changes from left-
justified to right-justified. Also, if the value contains
a zero or a double zero as part of the cents value, that
zero is no longer shown even though the number format
calls for 2 decimal places.

I am at a loss on this one. If anyone has any
suggestions, please forward them. I could also some
advice on how to get rid of the space between the cost and
the "(US)".

Thanks, Danno...


  #5   Report Post  
Dan Wilson
 
Posts: n/a
Default

Good day Ragdyer. Thank you very much for taking the time
to understand my issue and provide the solution that
WORKS. I try very hard to word my requests so that all
the necessary data is provided. I am interested in
knowing more about the "double unary" (--) just before the
Left function in the formula that you sent to me. I have
never encountered this before and could not find anything
in the Excel Help file about this element.

Thanks again for being the answer to my problem.
Danno...

-----Original Message-----
First of all, your formula that's doing the extracting is

a text formula,
that is returning Text, *not* true numbers.
Just look in the formula bar.
If you see dollar signs there, you know it's not a true

number.

Since you already have a "helper" column formatted to

Currency with 2
decimal places, there's no need for the column that

contains the extraction
formula to be formatted, since it's only a mid-point on

the road to the
final, properly formatted, final column.

Just revise your formula to this:

=--LEFT(C2,SEARCH(" ",C2,1))

And don't worry about trailing spaces, they'll disappear

automatically,
together with the dollar signs.
That double unary will return *true* numbers, which, when

you copy the
"values" over to the Currency pre-formatted "helper"

column, will give you
*true* numbers, displayed in the format that you chose.


--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all

may benefit!
==============================================

"Dan Wilson" wrote in message
...
Good day. I am using Excel 2002 with Windows ME. I have
a worksheet that contains product costs supplied to me by
my vendor in the following format;

$1.00 (US)
$12.00 (US)
$123.00 (US)
$1234.00 (US)

I have inserted two columns, one to contain a fomula and
the other to copy the formula results into.

The first column contains the formula shown below to
extract the " (US)" from each of the costs.

=LEFT(C2,SEARCH(" ",C2,1))

This appears to work although it does leave a single space
character behind the actual product cost. The worksheet
contains almost 300 different products and the cost for
each one.

After executing the formula shown above, I then copy the
entire column into the second column using Paste Special
and selecting Values. This appears to work also and
leaves me with the product cost with a left-justified
value with a dollar sign and a single space behind the
cost. Eventually I would like to get rid of the space.
Both of the new columns are formatted as Currency with 2
decimal places.

All appears to be OK. However, if I double-click any
single value in the second column and then click any other
cell, the value in the double-clicked cell loses its
currency formatting and changes to number format. This
loses the dollar sign and the value changes from left-
justified to right-justified. Also, if the value contains
a zero or a double zero as part of the cents value, that
zero is no longer shown even though the number format
calls for 2 decimal places.

I am at a loss on this one. If anyone has any
suggestions, please forward them. I could also some
advice on how to get rid of the space between the cost and
the "(US)".

Thanks, Danno...


.



  #6   Report Post  
RagDyer
 
Posts: n/a
Default

This may shed some light on the subject:

http://www.mcgimpsey.com/excel/formulae/doubleneg.html
--
Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit!
-------------------------------------------------------------------


"Dan Wilson" wrote in message
...
Good day Ragdyer. Thank you very much for taking the time
to understand my issue and provide the solution that
WORKS. I try very hard to word my requests so that all
the necessary data is provided. I am interested in
knowing more about the "double unary" (--) just before the
Left function in the formula that you sent to me. I have
never encountered this before and could not find anything
in the Excel Help file about this element.

Thanks again for being the answer to my problem.
Danno...

-----Original Message-----
First of all, your formula that's doing the extracting is

a text formula,
that is returning Text, *not* true numbers.
Just look in the formula bar.
If you see dollar signs there, you know it's not a true

number.

Since you already have a "helper" column formatted to

Currency with 2
decimal places, there's no need for the column that

contains the extraction
formula to be formatted, since it's only a mid-point on

the road to the
final, properly formatted, final column.

Just revise your formula to this:

=--LEFT(C2,SEARCH(" ",C2,1))

And don't worry about trailing spaces, they'll disappear

automatically,
together with the dollar signs.
That double unary will return *true* numbers, which, when

you copy the
"values" over to the Currency pre-formatted "helper"

column, will give you
*true* numbers, displayed in the format that you chose.


--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all

may benefit!
==============================================

"Dan Wilson" wrote in message
...
Good day. I am using Excel 2002 with Windows ME. I have
a worksheet that contains product costs supplied to me by
my vendor in the following format;

$1.00 (US)
$12.00 (US)
$123.00 (US)
$1234.00 (US)

I have inserted two columns, one to contain a fomula and
the other to copy the formula results into.

The first column contains the formula shown below to
extract the " (US)" from each of the costs.

=LEFT(C2,SEARCH(" ",C2,1))

This appears to work although it does leave a single space
character behind the actual product cost. The worksheet
contains almost 300 different products and the cost for
each one.

After executing the formula shown above, I then copy the
entire column into the second column using Paste Special
and selecting Values. This appears to work also and
leaves me with the product cost with a left-justified
value with a dollar sign and a single space behind the
cost. Eventually I would like to get rid of the space.
Both of the new columns are formatted as Currency with 2
decimal places.

All appears to be OK. However, if I double-click any
single value in the second column and then click any other
cell, the value in the double-clicked cell loses its
currency formatting and changes to number format. This
loses the dollar sign and the value changes from left-
justified to right-justified. Also, if the value contains
a zero or a double zero as part of the cents value, that
zero is no longer shown even though the number format
calls for 2 decimal places.

I am at a loss on this one. If anyone has any
suggestions, please forward them. I could also some
advice on how to get rid of the space between the cost and
the "(US)".

Thanks, Danno...


.



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 to format a date to a different format Laura Excel Discussion (Misc queries) 1 March 5th 05 09:59 PM
protecting format Esmerelda Excel Discussion (Misc queries) 1 February 25th 05 12:53 PM
Telephone number format MarkT Excel Discussion (Misc queries) 6 January 18th 05 10:39 PM
copy conditional format as ACTUAL format Dana Zulager Excel Discussion (Misc queries) 7 December 7th 04 11:02 PM
Copying a conditional format Meaux Excel Worksheet Functions 2 November 29th 04 10:19 AM


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