cells references

montecarlo2012

Well-known Member
Joined
Jan 26, 2011
Messages
985
Office Version
  1. 2010
Platform
  1. Windows
Hi, I am trying to make better, so instead of
VBA Code:
A = Range("B2").Value
B = Range("B3").Value
C = Range("B4").Value
E = Range("B5").Value
F = Range("B6").Value
G = WorksheetFunction.RoundUp(Abs(A + (1 + (B / C) * (E - F)) / 2), 0)
Range("B2").Value = G
I am trying to use this
Cells(2, 4).value = "=worksheetFunction.RoundUp(Abs(Cells(2, 2).Value + (1 + (Cells(3, 2).Value / (Cells(4, 2).Value * (Cells(5, 2).Value - Cells(6, 2).Value) / 2)))), 0)"
I need a hand here.
Thanks
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Maybe...
VBA Code:
Cells(2, 4).Value = WorksheetFunction.RoundUp(Abs(Cells(2, 2).Value + (1 + (Cells(3, 2).Value / (Cells(4, 2).Value) * (Cells(5, 2).Value - Cells(6, 2).Value) / 2))), 0)
 
Upvote 1
Solution
What values do you have in the cells as I get no error with
Book1.xlsb
B
219
310
420
517
618
745
Sheet5
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,973
Members
452,540
Latest member
haasro02

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