R
R
Roman2022-02-11 23:44:56
excel
Roman, 2022-02-11 23:44:56

How to sum numbers in a range where all cells are formatted in text format?

6206c83cbe3c2483350210.png

There is a line in which all cells are formatted as text, so that excel does not accept a forward slash when formatting a cell into a date.
I've found a way to sum the numbers before the slash separately from the numbers after the slash, but I can't figure out how to write a formula that sums the numbers written without the slash on the same line.
Below I will leave the array formulas for counting numbers with a slash in writing. The second one will not count two-digit numbers, but this is not required.

=СУММ(ЕСЛИ(ЕЧИСЛО(НАЙТИ("/";$E$2:$J$2));ЗНАЧЕН(ЛЕВСИМВ($E$2:$J$2;НАЙТИ("/";$E$2:$J$2)-1));0))

=СУММ(ЕСЛИ(ЕЧИСЛО(НАЙТИ("/";$E$2:$J$2));ЗНАЧЕН(ПРАВСИМВ($E$2:$J$2;НАЙТИ("/";$E$2:$J$2)-1));0))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2022-02-12
@scripterasm

Several ways to convert text to number:

=--A1
=1*A1
=Ч(A1)
=ЗНАЧЕН(A1)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question