top of page

How to work with and modify numbers in excel VBA?

Updated: Feb 3, 2021


vba Addition, Subtraction, Division, Multiplication, Power, Exp, Modulo remainder.

Numbers in VBA is quite intuitive. like normal math really.

Below are some examples of your normal math operations

Addition

Just use the normal '+' sign.

Subraction

Just use the normal '-' sign.

Division

Just use the normal '/' sign.

Multiplication

Just use the normal '*' sign.

Power

Just use the normal '^' sign.

Exponential

EXP function returns e raised to the nth power, where e = 2.7182..

MsgBox (Exp (0)) 'returns 1
MsgBox (Exp (1)) 'returns  2.71828182845905.

Modulo

The modulo operation returns the remainder of a division. Practical for determining even or odd numbers.

MsgBox (10 Mod 2) 'returns 0 as it is evenly divided. 
MsgBox (7 Mod 2) 'returns 1 as it is evenly divided three times, with 1 as remainder. 

2 comentários


CBKM BOCU
CBKM BOCU
03 de nov. de 2024

EPTU Machine ETPU Moulding…

EPTU Machine ETPU Moulding…

EPTU Machine ETPU Moulding…

EPTU Machine ETPU Moulding…

EPTU Machine ETPU Moulding…

EPS Machine EPS Block…

EPS Machine EPS Block…

EPS Machine EPS Block…

AEON MINING AEON MINING

AEON MINING AEON MINING

KSD Miner KSD Miner

KSD Miner KSD Miner

BCH Miner BCH Miner

BCH Miner BCH Miner

Curtir

Haley Woods
Haley Woods
03 de out. de 2021

Loved reading this tthanks

Curtir
bottom of page