in VBA you have ifs to,
so you'll need to follow the syntax
if condition then
else <-- optional else
end if
so......
public function NEWFORMULA(rng1 as excel.range,rng2 as excel.range)
dim intRng1Value as integer
dim intRng2Value as integer
if intRng1Value>intRng2Value then
IF(range("a1")/(SUM(rng1.address & ":" & rng2.address)<=1
.......and so on
end function
Bookmarks