View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Yes, I'm an idiot...But I cannot seem to divide two values in VBA see below

Try

Set span = Worksheets("Sheet1").Range("G20")
Set divisions = Worksheets("Sheet1").Range("E20")
answer= span.Value / divisions.Value
Worksheets("Sheet1").Range("J20").Value = answer


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



wrote in message
oups.com...
Obviously I'm a ultra newbie to this. I tried searching this
group and
find stuff that is close, but not what I need. If fear that I
am
looking for something that is so easy, that everyone else has
figured
it out. Hence, I cannot find the right solution.

See below for the oh so eloquent abortion of code that I have
brought
together.

Dim span As Range
Dim divisions As Range
Set span.Value = Worksheets("Sheet1").Range("G20")
Set divisions.Value = Worksheets("Sheet1").Range("E20")
Set answer.Value = span.Value / divisions.Value
Worksheets("Sheet1").Range("J20").Value = answer.Value

Now that I have the masses writhing in pain from my stupidity,
could
someone rectify the situation for this dolt.