01 - The Range Object
02 - Range Properties
03 - The Cells Object
04 - Variables
05 - Toolbars and Menus
06 - Super Important Tools and Excel Logic
07 - Loops and Report Writing Basics
EVENTS: Worksheet Events made Easy
WorkBook Events
1 of 2

Math With Variables

4 Comments
Collapse Comments

I have a strange situation

When I use type debug.Print 4^2
The computer automatically added a ";" ,....so the code becomes debug.Print 4^;2
And the result shows 4 2 in the immediate text box

Any help for this?

Dan Strong (Administrator) June 27, 2022 at 10:49 am

Hi Ng,

I've never seen this one before so I'm not sure. I wonder what language settings and delimiters you have in your settings, and what version of Excel (year and language) you have?

This is very interesting..

You might want to post it on the FB group here in case anyone else has heard of this

Thanks

Dan

Bala Gopi Shyam Uddanti September 12, 2022 at 9:31 pm

NG

You have written like this write in the immediate window

debug. print 4 mod 2

rather try this way

print 4 mod 2 ( or ) ? 4 mod 2

It will work correctly.

When working in an immediate window. There is no requirement of using debug.

Dan Strong (Administrator) September 13, 2022 at 4:44 pm

Excellent point!! Thanks

Leave a Comment

X

Forgot Password?

Join Us

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram