Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
ID | DATE | CODE | CODE2 | TYPE | NAME |
284 | 5/1/2013 | 6862 | 8863 | Direct with Landlord | Oil Price Information |
285 | 10/1/2007 | 6863 | 70781 | We Sublease | Communications Limited |
284 | 2/15/2016 | 6867 | 8883 | Our Subtenant | Holdings Limited |
285 | 2/15/2016 | 6868 | 27218 | Our Subtenant | Oil Price Information |
Here I want to rename NAME Column for ID 284 and 285 with Type = Our Sublet | ||||||
if(ID = 284 and Name = ' Holdings Limited' ,'Oil Price Information', If (ID =285 and NAME = 'Oil Price Information','Communications Limited',NAME)) This logic is not working.How can I write it in a diff way ? |
NAME is not consistent in your expression. May be this:
if(ID = 284 and NAME = 'Holdings Limited' ,'Oil Price Information',
If (ID =285 and NAME = 'Oil Price Information','Communications Limited',NAME))
or may be this:
If(ID = 284 and WildMatch(NAME, '*Holdings Limited*'), 'Oil Price Information',
If(ID = 285 and WildMatch(NAME, '*Oil Price Information*'), 'Communications Limited', NAME))
NAME is not consistent in your expression. May be this:
if(ID = 284 and NAME = 'Holdings Limited' ,'Oil Price Information',
If (ID =285 and NAME = 'Oil Price Information','Communications Limited',NAME))
or may be this:
If(ID = 284 and WildMatch(NAME, '*Holdings Limited*'), 'Oil Price Information',
If(ID = 285 and WildMatch(NAME, '*Oil Price Information*'), 'Communications Limited', NAME))
It was typo here,but in the script it is consistent.
Did you try my WildMatch suggestion? May be there are unknown spaces before or after the text?
Try with
if(ID = 284 and Trim(NAME) = ' Holdings Limited' ,'Oil Price Information',
If (ID =285 and Trim(NAME) = 'Oil Price Information','Communications Limited',NAME)) as NAME
let me know