Unsure why one works and ther other does not

Philosophaie

Active Member
Joined
Mar 5, 2010
Messages
256
Ms = 1.98
Mc = 9.4
G = 6.6
X=1
Y=2
Z=3
vx2 = Math.Sqr(G * (Ms + Mc) / X)
vy2 = Math.Sqr(G * (Ms + Mc) / Y) 'Invalid Procedure call or Argument
vz2 = Math.Sqr(G * (Ms + Mc) / Z)
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
When the error occurs, what are the values of G, Ms, Mc, and Y?

Also, variable names like vy2 are hazardous, since it could be a cell reference.
 
Upvote 0
Works fine here.

Is vy2 elsewhere defined?
 
Upvote 0
I narrowed it the Y and the Z. I also changed it from vy2 to v2y. Y is a very large # in my program ~1e8 could that have anything to do with it?
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,463
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top