-------- 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]
