Forum Discussion
Debug Error on Macro
- Feb 21, 2019
ROUNDDOWN is a built-in function. The use of it is
=ROUNDDOWN(number, num_of_digit)
The macro you wrote is a procedure to repeatedly insert function/formula into the cell in column U. So, it is not related to whether macro recognize ROUNDDOWN
You may try to change the num_of_digit parameter to see if it works. I thought ROUNDDOWN(A1,0) will gives a value round down to the nearest integer.
Easiest fix is to replace "" with 0
Thanks for your reply Wyn.
Just to clarify, Are you saying every line should look like this:
Range("$AZ30").Formula = "=IF(($S30 > 0)*($R30 > 0), $U30=$S30,"")0
with the last line looking like this:
Range("$AZ99").Formula = "=IF(($S99 > 0)*($R99 > 0), $U99=$S99,"")"
- Greg BonaparteFeb 19, 2019Iron Contributor
When I attempted to do this
Range("$AZ30").Formula = "=IF(($S30 > 0)*($R30 > 0), $U30=$S30,"")0
every line self populated with this
Range("$AZ99").Formula = "=IF(($S99 > 0)*($R99 > 0), $U99=$S99,"")0"
adding the quote sign automatically.
- Wyn HopkinsFeb 19, 2019MVP
No I mean this sorry
Range("$AZ30").Formula = "=IF(($S30 > 0)*($R30 > 0), $U30=$S30,0)"
- Greg BonaparteFeb 19, 2019Iron Contributor
Thank you Wyn, The debug error went away. However instead of getting the value in u30 to equal the value is s30, I get a "false" message in az30.