If i can get Formula Sytanx right for summing then why not for....

NimishK

Well-known Member
Joined
Sep 4, 2015
Messages
688
Anyone who can help me to correct
If i can get Formula Sytanx right for summing

Sheet4.Cells(TotRow, 8).Formula = "=Sum(C" & fRow & ":C" & lRow & ")" as =SUM(C2:C5) in a Cell
then why not for the following
Sheet4.Cells(TotRow, 10).Formula = "=" & Sheet4.Cells(TotRow, 8).Value * Sheet4.Cells(TotRow, 3) / 100)
I am getting as =Figure and not as =H5*H3/100 in the cell
Thanks
NimishK
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Untested, but I thiunk you need

"
Code:
=Sheet4!H" & TotRow & "*Sheet4!H" & TotRow & " / 100)"

but that doesn't equate to H5*H3/100....I'm guessing you will be able to mdify as required
 
Upvote 0
ooops, sorry
Code:
.Formula = "=Sheet4!H" & totrow & "*Sheet4!H" & totrow & " / 100"
 
Upvote 0
Sorry Michael It did not work. Hope you had tried too

By the way if i defined

wS as Worksheet then how would the syntax be for Following
Dim wS as Worksheet
Set wS = Sheets("Sheet4")
ws.Cells(TotRow, 10).Formula = "=" & ws.Cells(TotRow, 8).Value * ws.Cells(TotRow, 3) / 100)
 
Last edited:
Upvote 0
By the way if i defined

wS as Worksheet then how would the syntax be for Following
Code:
Dim wS as Worksheet
Set wS = Sheets("Sheet4")
ws.Cells(TotRow, 10).Formula = "=" & ws.Cells(TotRow, 8).Value * ws.Cells(TotRow, 3) / 100)
Try it like this...
Code:
[table="width: 500"]
[tr]
	[td]  Dim wS As Worksheet
  Dim TotRow As Long
  Set wS = Sheets("Sheet4")
  TotRow = 9
  wS.Cells(TotRow, 10).Formula = "=" & wS.Cells(TotRow, 8).Address(0, 0) & "*" & wS.Cells(TotRow, 3).Address(0, 0) & "/100"[/td]
[/tr]
[/table]
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

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