Read CR as negative and DR as positive

Turn 125.50 CR into -125.5 and 310.20 DR into 310.2.

What you'll make

In Excel: 125.50 CR becomes -125.5.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1TEXTAFTER(A8," ",-1)Takes the marker after the last space, called k."CR"
2NUMBERVALUE( … )Reads the amount before that space as a number, n.125.5
3SWITCH(k, … )Makes CR amounts negative and keeps DR positive.-125.5
4"Review CR/DR marker"Shown when the marker isn't CR or DR.Not used for row 8
5LET( … )Names the marker and amount, then gives the answer.-125.5

A period marks decimals. The amounts are made-up.

=LET(k,TEXTAFTER(A8," ",-1),n,NUMBERVALUE(TEXTBEFORE(A8," ",-1),".",","),SWITCH(k,"CR",-n,"DR",n,"Review CR/DR marker"))

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own amounts. Paste amounts like 125.50 CR into the green column of the Template tab. The numbers fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Use this only when your source says CR is negative and DR is positive. Some systems use the opposite.

Microsoft's help: NUMBERVALUE function