Divide by 3

G

GARY

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).
 
G

Guest

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top