filmov
tv
Remove characters from a string using LEFT and RIGHT - Fix your data! (Excel tips #3)

Показать описание
#excel #exceltips #exceltutorial #exceltricks #exceltipsandtricks
Follow me on other media:
Music used:
Annotations:
Often times, data is delivered in unworkable
formats.
For instance, this financial data is a string (data
type), has dollar signs and a decimal number
too much.
This means that you can't add, substract, sum
or average these numbers.
The sum function returns 0.
Let's fix this data!
Select a cell and type: RIGHT(B2;6) and press
'Enter'.
This function takes the 6 characters from right
from cell B2. The dollar sign is the 7th character
from the right, and is now gone in cell D2.
Drag cell D2 down by the corner to repeat the
formula in the cells below.
To remove a character from the left, type
LEFT(D2;5), and press ENTER.
This function takes the 5 characters from cell D2
from the left, which gets rid of the last decimal.
(NOTE: this is not the same as rounding!)
Drag cell F2 down by the corner to repeat the
formula in the cells below.
Finally, copy the new column of data, and paste
them as Values, to get rid of the formulas you
used to create the values in column F.
Hover over the '!' and click 'Convert to Number'.
You can now use this data as a number, and for
instance, calculate the sum.
To add the dollar signs back in, but keep the
data as numbers, select the data, right-click,
and click 'Format Cells...'
Click the 'Number'-tab, and select 'Currency'.
Find, and click on "$ English (U.S.)" in the drop-
down menu, and click 'OK'.
You can now remove the column with the old
data and the RIGHT and LEFT formula colums.
All done!
Комментарии