Dave Barton wrote:
-------- Original Message  --------
From: Wade Smart <[email protected]>
To: [email protected]
Date: Sat, 31 Jul 2010 14:47:07 -0500

Dave Barton wrote:
-------- Original Message  --------
From: Dave Barton <[email protected]>
To: [email protected]
Date: Sun, 01 Aug 2010 05:10:14 +1000

-------- Original Message  --------
From: Wade Smart <[email protected]>
To: [email protected]
Date: Sat, 31 Jul 2010 12:54:14 -0500

Dave Barton wrote:
-------- Original Message  --------
From: Wade Smart <[email protected]>
To: [email protected]
Date: Sat, 31 Jul 2010 10:46:42 -0500

I need to get the product code from a numeric string.
I tried RIGHT(C2,4) but apparently this only works with letters
and not
numbers.

Wade
Does =RIGHT(TEXT(C2,"#"),4) do what you want?

Dave

no.

=RIGHT(TEXT(C2,"#"),4)
C2 = .. (last six digits) 0/1981
the above function produces 9736

Wade
Please provide more information about the contents of cell C2. Your
email header suggests you may be running some flavour of Linux. Are you
using the OOo standard edition from the OOo website, or a distro
supplied edition?

I cannot replicate your results. If I simply enter 0/1981 in cell C2 my
suggestion does not work, because Calc appears to treat the contents of
cell C2 as text. In which case your original formula:
=RIGHT(C2;4) for the OOo standard edition
or
=RIGHT(C2,4) for the Go-OO/Novel edition
should work.

Dave
I have now replicated your results by changing the contents of cell C2
to a date (sometime in 1981), not a product code number as indicated in
your original email.

Could it be that Calc is translating what you perceive as as a product
code into a date?

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Im on Ubuntu 9.04, OO 3.0.1, OOO300m15 Build:9379.

If I put this number into C2 and run it I get 1981.
Cell C2 = 2U915/ELEPVANISV0/1981

It might be taken for a date.

Would the RIGHT() function not work on a date?

Wade

No the right function will not work on a date. See Joe Connor's reply
for the explanation.

Unless there is good reason not to, I suggest formatting your product
code cells as text. This will prevent Calc from interpreting them as a date.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



The notes I have say this column was originally formated to number. I changed it to Text and its working now.

Thanks

Wade

--
Registered Linux User: #480675
Registered Linux Machine: #408606
Linux since June 2005

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to