Содержание
- Обзор функций LOG10
- Синтаксис и входные данные функции LOG10:
- LOG10 Функция
- Функция LOG10 — десятичная
- Функция LOG10 — отрицательное число / ноль
- Функция LOG10 — степень 10
- LOG10 в Google Таблицах
- Дополнительные замечания
- LOG10 Примеры в VBA
Скачать пример рабочей книги
Загрузите образец книги
В этом руководстве показано, как использовать Функция Excel LOG10 в Excel, чтобы вычислить десятичный логарифм числа.
Функция LOG10 Вычисляет десятичный логарифм числа.
Чтобы использовать функцию листа Excel LOG10, выберите ячейку и введите:
(Обратите внимание, как появляются входные данные формулы)
Синтаксис и входные данные функции LOG10:
количество — Число.
LOG10 Функция
Функция LOG10 возвращает логарифм числа с точностью до 10.
Функция LOG10 — десятичная
Функция LOG10 также может возвращать логарифм десятичного числа с основанием 10.
Функция LOG10 — отрицательное число / ноль
Функция LOG10 вернет ошибку, если аргумент равен нулю или отрицательному числу.
Функция LOG10 — степень 10
Функция LOG10 вернет показатель степени, если аргумент выражен как степень 10.
LOG10 в Google Таблицах
Функция LOG10 работает в Google Таблицах точно так же, как и в Excel:
Дополнительные замечания
Используйте функцию LOG10, чтобы вычислить логарифм числа по основанию 10. Просто введите любое число прямо в формулу или укажите ссылку на ячейку, содержащую число.
LOG10 Примеры в VBA
Вы также можете использовать функцию LOG10 в VBA. Тип:application.worksheetfunction.log10 (номер)
Выполнение следующих операторов VBA
12345678 | Диапазон («B2») = Application.WorksheetFunction.Log10 (Диапазон («A2»))Диапазон («B3») = Application.WorksheetFunction.Log10 (Диапазон («A3»))Диапазон («B4») = Application.WorksheetFunction.Log10 (Диапазон («A4»))Диапазон («B5») = Application.WorksheetFunction.Log10 (Диапазон («A5»))Диапазон («B6») = Application.WorksheetFunction.Log10 (Диапазон («A6»))Диапазон («B7») = Application.WorksheetFunction.Log10 (Диапазон («A7»))Диапазон («B8») = Application.WorksheetFunction.Log10 (Диапазон («A8»))Диапазон («B9») = Application.WorksheetFunction.Log10 (Диапазон («A9»)) |
даст следующие результаты
Для аргументов функции (числа и т. Д.) Вы можете либо ввести их непосредственно в функцию, либо определить переменные, которые будут использоваться вместо них.
Вернуться к списку всех функций в Excel
Вы поможете развитию сайта, поделившись страницей с друзьями
1014 / 118 / 2 Регистрация: 26.08.2011 Сообщений: 1,113 Записей в блоге: 2 |
|
1 |
|
13.03.2018, 23:27. Показов 8059. Ответов 3
Есть формула
0 |
Заблокирован |
||||||||
13.03.2018, 23:35 |
2 |
|||||||
Но нужно иметь ввиду, что Log (в VBA) — это логарифм по основанию e (=2.718282)
F1 не работает у Вас?
2 |
AndreA SN 1014 / 118 / 2 Регистрация: 26.08.2011 Сообщений: 1,113 Записей в блоге: 2 |
||||
13.03.2018, 23:52 [ТС] |
3 |
|||
Нет… логарифмов боюсь… Добавлено через 1 минуту
?
0 |
Заблокирован |
|
14.03.2018, 00:19 |
4 |
То есть Наверно… если lg — это логарифм по основанию 10 (математику забыл, да и не знал никогда
0 |
VBA Log function in Excel is categorized as Math(Mathematical) & Trig function. This is a built-in Excel VBA Function. This function returns the natural logarithm of a specified number.
We can use this function in Excel and VBA. This function we use in either procedure or function any number of times in a Excel VBA editor window. Let us learn what is the syntax and parameters of the Log function. Let us see where we can use this Log Function and real-time examples in Excel VBA.
Table of Contents:
- Objective
- Syntax of VBA Log Function
- Parameters or Arguments
- Where we can apply or use VBA Log Function?
- Example 1: Calculate the log/logarithm value of the number(1.5)
- Example 2: Calculate the log/logarithm value of the number(1)
- Example 3: Calculate the log/logarithm value of the number(‘4’)
- Example 4: Calculate the log/logarithm value of the number(-10)
- Instructions to Run VBA Macro Code
- Other Useful Resources
The syntax of the Log Function in VBA is
Log(Number)
The Log function returns a double value.
Parameters or Arguments:
The Log function has one argument in Excel VBA.
where
Number:The Number is a required parameter. This argument represents a number or numeric value, which consists double data type. The specified number should be positive number or greater than zero. If specified number is negative,then returns an error.
Where we can apply or use VBA Log Function?
We can use this Log Function in VBA MS Office 365, MS Excel 2016, MS Excel 2013, 2011, Excel 2010, Excel 2007, Excel 2003, Excel 2016 for Mac, Excel 2011 for Mac, Excel Online, Excel for iPhone, Excel for iPad, Excel for Android tablets and Excel for Android Mobiles.
Example 1: Calculate the log/logarithm value of the number(1.5)
Here is a simple example of the VBA Abs function. This below example calculates the log/logarithm value of the number(1.5).
'Calculate the log/logarithm value of the number(1.5) Sub VBA_Log_Function_Ex1() 'Variable declaration Dim iValue As Double Dim dResult As Double iValue = 1.5 dResult = Log(iValue) MsgBox "The logarithm value of the number 1.5 is : " & dResult, vbInformation, "VBA Log Function" End Sub
Output: Here is the screen shot of the first example output.
Example 2: Calculate the log/logarithm value of the number(1)
Here is another example of the VBA Abs function. This below example calculates the log/logarithm value of the number(1).
'Calculate the log/logarithm value of the number(1) Sub VBA_Log_Function_Ex2() 'Variable declaration Dim iValue As Double Dim dResult As Double iValue = 1 dResult = Log(iValue) MsgBox "The logarithm value of the number 1 is : " & dResult, vbInformation, "VBA Log Function" End Sub
Output: Here is the screen shot of the second example output.
Example 3: Calculate the log/logarithm value of the number(‘4’)
Let us see one more example of the VBA Abs function. This below example calculates the log/logarithm value of the number(‘4’).
'Calculate the log/logarithm value of the number('4') Sub VBA_Log_Function_Ex3() 'Variable declaration Dim iValue As String Dim dResult As Double iValue = "4" dResult = Log(iValue) MsgBox "The logarithm value of the number '4' is : " & dResult, vbInformation, "VBA Log Function" End Sub
Output: Here is the screen shot of the third example output.
Example 4: Calculate the log/logarithm value of the number(-10)
Here is a simple example of the VBA Abs function. This below example calculate the log/logarithm value of the number(-10).
'Calculate the log/logarithm value of the number(-10) Sub VBA_Log_Function_Ex4() 'Variable declaration Dim iValue As Double Dim dResult As Double iValue = -10 dResult = Log(iValue) MsgBox "The logarithm value of the number -10 is : " & dResult, vbInformation, "VBA Log Function" End Sub
Output: Here is the screen shot of the third example output.
Instructions to Run VBA Macro Code or Procedure:
You can refer the following link for the step by step instructions.
Instructions to run VBA Macro Code
Other Useful Resources:
Click on the following links of the useful resources. These helps to learn and gain more knowledge.
VBA Tutorial VBA Functions List VBA Arrays in Excel Blog
VBA Editor Keyboard Shortcut Keys List VBA Interview Questions & Answers
В VBAиспользуются следующие
виды функций:
— математические встроенные функции;
— математические функции, не представленные
в VBA;
— функции форматирования данных;
— функции преобразования типов
Математические встроенные функции
Функция |
Возвращаемое |
Abs (x) |
|
Atn (x) |
arctg(x) – арктангенс от |
Sin (x) |
sin(x) – возвращает синус |
Cos (x) |
cos(x) – косинус указанного |
Tan (x) |
tg(x) – возвращает тангенс |
Exp (x) |
ex– возвращает числоe, |
Log (x) |
ln(x) – возвращает натуральный |
Sqr (x) |
|
Rnd (x) |
Случайное |
Sgn (x) |
Возвращает +1, если значение параметра -1, если отрицательное, 0, если 0 |
Fix (x) |
Возвращает |
Int(x) |
Возвращает |
Математические функции, не представленные в vba
Функция |
Возвращаемое |
Log(X)/Log(10) |
lg(х) |
Atn |
arcsin(x) – возвращает арксинус |
Atn |
arccos(x) – возвращает арккосинус |
Cos (x)/Sin (x) |
ctg(x) — возвращает котангенс |
Значение |
Pi = 4 * Atn (1) |
Функция форматирования данных
Для того чтобы представить выражение
отформатированным в специфицированном
формате, необходимо воспользоваться
функцией Format. Она возвращает
значение типаVariant(String),
содержащее выражение, отформатированное
согласно указанным спецификациям.
Синтаксис:
Format(выражение [ , «Имя
формата (или символ формата)»])
Именованные числовые форматы
Имя формата |
Описание |
GeneralNumber |
Число без |
Currency |
Отображает |
Fixed |
Отображает |
Standard |
Отображает |
Percent |
Отображает |
Scientific |
Использует |
Yes/No |
Отображает |
True/False |
Отображает |
On/Off |
Отображает |
Соседние файлы в папке Лаб. раб. VBA
- #
- #
- #
- #
- #
- #