2009/9/26 Wade Smart <[email protected]>

> JOE Conner wrote:
>
>> Wade Smart wrote:
>>
>>> I have a group of numbers in a column
>>> 265879-09-24-71-918-333-0055
>>> and I need to take the fourth set of numbers, in this case the 71, and
>>> subtract it from the current year to get the age of the item.
>>>
>>> Ideas on how to do that?
>>>
>>> Wade
>>>
>> Is this a spreadsheet column or is it writer?
>>
>
> Sorry, spreed sheet.
>
>
> Wade
>
> Assume the numbers are in column A.

   1. Copy column A to column B
   2. Select column B
   3. Go to the Find & Replace menu
   4. In the Find box enter
   "[:digit:]+-[:digit:]+-[:digit:]+-([:digit:]+)-[:digit:].*" without the
   quotes
   5. In the Replace box enter "$1" without the quotes
   6. Click More Options
   7. Check Regular expressions
   8. Check Current selection only
   9. Click Replace All
   10. The values in column B will change so that it only contains the 4th
   number in each row.
   11. In column C enter an appropriate formula such as
   "=YEAR(NOW())-(B1+1900)" assuming the "71" in your example means 1971.



-- 
Harold Fuchs
London, England
Please reply *only* to [email protected]

Reply via email to