top of page

How to work with and modify numbers in excel VBA?


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. 

39 views2 comments

2件のコメント


CBKM BOCU
CBKM BOCU
6 days ago

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

いいね!

Haley Woods
Haley Woods
2021年10月03日

Loved reading this tthanks

いいね!
bottom of page