How to use Evaluate for roundup or ceiling in range

alee001

Board Regular
Joined
Sep 9, 2014
Messages
137
Office Version
  1. 2010
Platform
  1. Windows
Hello, I don't know to compile Evaluate() to roundup or ceiling in range as following code, Anyone tips for me?
VBA Code:
Sub sample2()
Cells(3, 13).Resize(10, 3).Value = Evaluate("I3:K12" & "/" & 1.2 & "+" & 0.4)
Cells(3, 13).Resize(10, 3).Value = Evaluate("ROUND(" & "I3:K12" & "/" & 1.2 & "+" & 0.4 & ",3)") 'how to roundup?
Cells(3, 13).Resize(10, 3).Value = Evaluate("CEILING(" & "I3:K12" & "/" & 1.2 & "+" & 0.4 & ",0.02)") 'how to ceiling?
End Sub
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
65,943
Office Version
  1. 365
Platform
  1. Windows
It forces the evaluate to look at cells individually, but is not needed on newer versions of Xl.

Please don't forget to update you profile. ;)
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

alee001

Board Regular
Joined
Sep 9, 2014
Messages
137
Office Version
  1. 2010
Platform
  1. Windows
It forces the evaluate to look at cells individually, but is not needed on newer versions of Xl.

Please don't forget to update you profile. ;)
I learn more. Thanks.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
65,943
Office Version
  1. 365
Platform
  1. Windows
Glad we could & thanks for the feedback.
 

Forum statistics

Threads
1,148,194
Messages
5,745,276
Members
423,942
Latest member
excelhelp1423

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
Top