#1   Report Post  
Posted to microsoft.public.excel.misc
GARY
 
Posts: n/a
Default Divide by 3

I'm working with a .TXT file.

In column A, when the second character in the cell is an $, for
example:

$369.09 xxxxx
$4,200.24 xxxx
$38.67 xxxxx
$296,169.45 xxxxx
$13.68 xxxxx

is there a way to divide the amounts (after the $) by 3 so the cell
contains:

$123.03 xxxxx
$1,400.08 xxxx
$12.89 xxxxx
$98,169.45 xxxxx
$4.56 xxxxx

(NOTE: If the second character in the row is NOT a $, leave the row as
is).

  #2   Report Post  
Posted to microsoft.public.excel.misc
hans bal(nl)
 
Posts: n/a
Default Divide by 3

Yo can do this by first converting the number in you text string to a value,
divide it and the convert it back to the string again.

use this formula and amend it to your liking :

=IF(LEFT(A1,2)=" $",CONCATENATE(" $",VALUE(MID(A1,3,(FIND("
",A1,3)-3)))/3,MID(A1,FIND(" ",A1,3),255)),A1)

"GARY" wrote:

I'm working with a .TXT file.

In column A, when the second character in the cell is an $, for
example:

$369.09 xxxxx

is there a way to divide the amounts (after the $) by 3 so the cell
contains:

$123.03 xxxxx
$1,400.08 xxxx
$12.89 xxxxx
$98,169.45 xxxxx
$4.56 xxxxx

(NOTE: If the second character in the row is NOT a $, leave the row as
is).


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 you divide two cells in a pivot table to equal a %? Annette Excel Worksheet Functions 0 April 25th 06 08:44 PM
how do I Divide "/" a row of cells by another row of cells? oxicottin Excel Worksheet Functions 5 February 21st 06 06:22 PM
Custom Format to divide by 10 Ailish Excel Discussion (Misc queries) 2 October 26th 05 05:04 PM
Divide one row over other row I dont wont to divide one number Rick Excel Discussion (Misc queries) 0 March 4th 05 07:13 PM
Divide Ranks into two teams (mathematical guru challenge) Theatre Admin Excel Discussion (Misc queries) 4 February 10th 05 02:15 PM


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