Hello. I cannot figure this out.
=IF([GL Code]@row = 14030, "Leasehold")
How do I add additional IF statements in the same cell, for example if the GL Code@row = 14040, "FF&E", GL Code@row = 14050, "CR Equip"
Thanks.
=IF([GL Code]@row = 14030, "Leasehold", IF([GL Code]@row = 14040, "FF&E", If([GL Code]@row = 14050, "CR Equip")))
Dont close the parenthesis - it does it as if the condition is met, x, then you can continue to add which will parse out after recognizing previous conditions arent met.
The format is: If(test,true,false), to nest them you just put new if statements in place of the false:
if(test,true,if(test,true,if(test,true,false))
=IF([GL Code]@row = 14030, "Leasehold", if([GL Code]@row = 14040, "FF&E", if([GL Code]@row = 14050, "CR Equip", "")))
The above should work for you. Note that if none of those codes match it will just show blank. If you are going to be adding a BUNCH of these codes, note that this isn't the best way. If you have another sheet with a column of possible codes (CodeColumn) and another of possible names (NameColumn) you can index through it using index(match()):
=iferror(index({NameColumn},match([GL Code]@row ,{CodeColumn},0)),"")
To understand a function like this, work from the inside out: This one goes through the CodeColumn column until it finds a match for your [GL Code]@row value. It then indexes that same amount through your NameColumn to pull that value back. If it doesn't find any it throws an error and the iferror() function makes it just stay empty.
ref must be one of: categoryID, siteSectionID, category, category/categoryID, category/name, category/description, category/url, category/allowedDiscussionTypes, locale, siteSection, siteSection/basePath, siteSection/contentLocale, siteSection/sectionGroup, siteSection/sectionID, siteSection/name, siteSection/description, siteSection/apps, siteSection/attributes, layoutViewType, discussionID, commentID, page, sort, discussion, discussion/name, tags, breadcrumbs, discussionApiParams, serverDraftID, serverDraft.