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

NimishK

Well-known Member
Joined
Sep 4, 2015
Messages
684
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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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,214,386
Messages
6,119,212
Members
448,874
Latest member
b1step2far

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