excel - VBA if then function always returning 0 -
my friend , have searched internet answer. new vba , function returning 0. great. below code:
function onlineabs(x date, y date, z date) if x > 0 if y > 0 result = "online - images" else if z > 0 result = "online - dt images" else result = "online - no images" end if end if else result = "abstract" end if end function
function returns in vba little different. setting value want returned function name return value.
function onlineabs(x date, y date, z date) if x > 0 if y > 0 onlineabs = "online - images" else if z > 0 onlineabs = "online - dt images" else onlineabs = "online - no images" end if end if else onlineabs = "abstract" end if end function
Comments
Post a Comment