Hiya,
Im trying to build something like this... I think i have the body of it, but i keep getting compliation errors, not surprising though as it's only my second ever UDFAny help would be appreciated.
Function Template (value AS Integer, word AS string) AS string
IF(value = "01") //if cell value = 01
AND IF(word ="test") // if cell value x = 01 and cell value y = test
Template = "yes" //return YES
ELSE
IF(value = "02")
AND IF (word = "test2")
Template = "yes"
//repeat for all posibilities
ELSE
Template = "no" //return NO for all cases not listed
END IF
END FUNCTION
I know its pretty rough, but i think the guts of it is there based on my previous basic programming experience.... little help?
Thanks
Andrew
hi, Andrew, please wrap VB code in code tags (see Forum Rules for details)
DataJunkie
Your post does not comply with Rule 7 of our Forum RULES. Please do not ignore Moderators' or Administrators' requests - note that this includes requests by senior members as well, if you are unclear about their request or instruction then send a private message to them asking for help. Do not post a reply to a thread where a moderator has requested an action that has not been complied with e.g Title change or Code tags...etc
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks