Running formulas from within an IF statement
Hi!
I was wondering if it is possible to run a formula from within an IF statement. We have contact submission sheet we need to scrub and one of things that's messing with the process is from entries that have an extra space at the end of the values (For example "Bruce" and "Bruce ").
I have an column formula for an IF statement to identify which rows within a column have the extra space (=IF(RIGHT([First Name]@row, 1) = " ", 1, [First Name@row]) so I know that part functions, but what I'd like to do is set the formula so that: if the IF is true, it runs and returns LEFT([FirstName]@row, (LEN(CELLREFERENCE) - 1)) but if it is false then it just returns [First Name@row].
I tried it like this: "=IF(RIGHT([First Name]@row, 1) = " ", (LEFT([FirstName]@row, (LEN([FirstName]@row) - 1))), [First Name@row])" but it is returning an a message about a syntax error. I checked what can and cannot run as column formulas but I don't see where this breaks that (unless LEN only works as a specific cell reference).
Any and all help would be appreciated!
Best Answer
-
Looks like you have some extra parenthesis and a misplaced closing square bracket.
=IF(RIGHT([First Name]@row, 1) = " ", LEFT([FirstName]@row, LEN([FirstName]@row) - 1), [First Name]@row)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
Looks like you have some extra parenthesis and a misplaced closing square bracket.
=IF(RIGHT([First Name]@row, 1) = " ", LEFT([FirstName]@row, LEN([FirstName]@row) - 1), [First Name]@row)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Thank you! That resolved it.
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 302 Events
- 33 Webinars
- 7.3K Forum Archives