30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

Yesterday during the marathon 30 ຟັງຊັນ Excel ໃນ 30 ມື້ we retrieved an element from the list using the function ເລືອກ (ВЫБОР) и выяснили, что для поиска гораздо удобнее использовать другие функции, например, VLOOKUP (VLOOKUP) ຫຼື MATCH (ເປີດເຜີຍເພີ່ມເຕີມ).

We will spend the sixth day of the marathon studying the function FIXED (ФИКСИРОВАННЫЙ), которая форматирует число с дробной частью и разделителями и возвращает результат в текстовом формате. Полагаю, что это не должно сильно Вас удивить, поскольку функция FIXED (ФИКСИРОВАННЫЙ) принадлежит к категории текстовых. Заслуживает ли функция FIXED (FIXED) to be used? Look at the examples and decide for yourself.

So let’s get familiar with the function FIXED (FIXED) in more detail and consider a few examples of working with it. If you have something to add to the description or some examples of your own, please share them in the comments. Perhaps I missed some amazing feature of this feature. This moment should be FIXED and corrected!

Функция 06: FIXED (ФИКСИРОВАННЫЙ)

ຫນ້າທີ່ FIXED (ФИКСИРОВАННЫЙ) округляет число до определённого количества десятичных знаков и возвращает результат в текстовом формате с разделителями разрядов или без.

How can the FIXED function be used?

ຫນ້າທີ່ FIXED (FIXED) can convert numbers to text format by rounding to a specified number of decimal places. The function can be useful for a narrow range of tasks, such as:

  • Compare numbers imported as text from other applications.
  • Convert numbers to text string.

Синтаксис FIXED (ФИКСИРОВАННЫЙ)

ຫນ້າທີ່ FIXED (FIXED) has the following syntax:

FIXED(number,decimals,no_commas)

ФИКСИРОВАННЫЙ(число;число_знаков;без_разделителей)

  • ຈໍານວນ (number) is the number you want to round and convert to text.
  • ອັດຕານິຍົມ (число_знаков) — требуемое количество разрядов справа от десятичной точки. По умолчанию количество разрядов справа от десятичной точки равно 2. Если же указано отрицательное значение, то разряды округляются слева.
  • ຖ້າການໂຕ້ຖຽງ no_commas (without_separators) is FALSE (FALSE) or not specified at all, then the result is displayed with separators.
  • ຖ້າການໂຕ້ຖຽງ no_commas (no_separators) is TRUE, the result is output without delimiters.

In a number of countries around the world, in particular in Canada, a dot is used as a separator between integer and fractional parts, and a comma is used for separators of groups of discharges. For example: 32,187.57. In Our Country, it is customary to use a comma and a space, respectively, i.e. 32 187,57. Please pay attention to this, since the article is a translation of a Canadian author.

При желании Вы можете настроить разделители целой и дробной части, а также разделители групп разрядов. Сделать это можно в параметрах Microsoft Excel или в настройка региональных стандартов Вашей операционной системы.

Ловушки FIXED (ФИКСИРОВАННЫЙ)

ຫນ້າທີ່ FIXED (ФИКСИРОВАННЫЙ) превращает число в текст, поэтому не используйте ее там, где необходимо числа оставить числами. Например, чтобы ограничить количество десятичных знаков в таблице данных графика, используйте форматирование чисел в ячейках или функцию ROUND (ОКРУГЛ).

Example 1: Formatting a rounded number

ຫນ້າທີ່ FIXED (FIXED) allows you to take a number, round it to a certain decimal place, add delimiters, and return the result in text format. For example, if you enter the number in cell C2 32187.5689231, then you can use the function FIXED (FIXED) to round it to two decimal places and add separators.

=FIXED(C2,2,FALSE)

=ФИКСИРОВАННЫЙ(C2;2;ЛОЖЬ)

30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

Вместо использования функции FIXED (FIXED) you can simply apply a number format to the cell with 2 decimals and separators. In this case, the contents of the cell will not change, but only the formatting will change.

30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

ທ່ານສາມາດນໍາໃຊ້ຫນ້າທີ່ ROUND (ROUND) combined with cell formatting to produce a number with thousands separators and rounded to hundredths.

=ROUND(C2,2)

=ОКРУГЛ(C2;2)

30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

In the end, if you really need the result in text format, use the function ຂໍ້​ຄວາມ (ТЕКСТ). Её возможности форматирования гораздо более гибкие, а если требуется округлить число, Вы можете использовать её в сочетании с функцией ROUND (ОКРУГЛ):

=TEXT(C2,"#,###.00?")

=ТЕКСТ(C2;"# ###,00?")

30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

Example 2: Rounding digits to the left of the decimal point

ການນໍາໃຊ້ຫນ້າທີ່ FIXED (FIXED) you can round numbers to the left of the decimal point using a negative number as an argument ອັດຕານິຍົມ (число_знаков). Чтобы убрать разделители, задайте значение аргумента no_commas (без_разделителей) равным TRUE (ИСТИНА). Как и прежде, мы получим результат в текстовом формате:

=FIXED(C2,-2,TRUE)

=ФИКСИРОВАННЫЙ(C2;-2;ИСТИНА)

30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

ທ່ານຍັງສາມາດໃຊ້ຟັງຊັນ ROUND (ОКРУГЛ), чтобы округлить число слева от десятичной точки.

=ROUND(C2,-2)

=ОКРУГЛ(C2;-2)

30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

Пример 3: Отображение числа в тысячах долларов

ຫນ້າທີ່ FIXED (FIXED) has limited formatting options and only controls the number of decimal places and thousands separators. Using the function FIXED (ФИКСИРОВАННЫЙ) Вы можете округлить число до тысяч, но не сможете добавить знак доллара или спрятать нули.

=FIXED(C2,-3)

=ФИКСИРОВАННЫЙ(C2;-3)

30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

Вместо использования функции FIXED (ФИКСИРОВАННЫЙ) Вы можете назначить пользовательский формат ячейке вида «$#,“. It will leave the contents of the cell unchanged, only changing the display.

30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

Чтобы получить точно такой же результат в текстовом формате, используйте функцию ຂໍ້​ຄວາມ (TEXT), which will allow you to set the number format in thousands of dollars.

=TEXT(C3,"$#,")

=ТЕКСТ(C3;"$# ")

The second expression uses a space instead of a comma. Use this format if you use spaces as thousands separators.

30 ຟັງຊັນ Excel ໃນ 30 ມື້: FIXED

ອອກຈາກ Reply ເປັນ