What is the VBA for Excel multiply sign

hill0093

Board Regular
Joined
Dec 4, 2011
Messages
163
A4 has 0 and B4 has 0.600c00 and C4 has 0.050c*****
Then this code is executed:
Code:
  Dim stepFac as Double
  stepFac = CDbl(Mid(Range("B4"), InStr(1, Range("B4"), "c") + 1) & _
                Left(Range("C4"), InStr(1, Range("C4"), "c") - 1))
  Range("J1") = stepFac 'for check only
  Dim lgtFact as Double
  lgtFact = CDbl(Mid(Range("A4"), InStr(1, Range("A4")     ) + 1) & _
                Left(Range("B4"), InStr(1, Range("B4"), "c") - 1))
  Range("K1") = lgtFact 'for check only
  Dim serLgt as Double
  Range("L1") = Cells(20, 3).Value  'for check only
  serLgt = Cells(20, 3).Value * lgtFac
  Range("M1") = serLgt  'for check only
And afterward:
J1 has 0.05 and K1 0.6 and L1 has 644576.83 and M1 has 0

The "lgtFact = " line was only a guess because no one has OKed it,
but the only cell of the four that's incorrect is M1.

It's more than I can figure out, but to me it looks like
the '*' is not a multiply sign, but i thought it is for multiply.
And I also need a VBA-for-Excel reference manual.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hello hill0093,

The multiply sign in VBA is the asterisk (*). It looks like you have made a typo in the code. You declared the variable as lgtFact but typed lgtFac. See below...
Rich (BB code):
serLgt = Cells(20, 3).Value * lgtFac
 
Upvote 0

Forum statistics

Threads
1,215,813
Messages
6,127,026
Members
449,352
Latest member
Tileni

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