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)
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)
-
Thank you! That resolved it.
-
Happy to help. 👍️
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.2K Get Help
- 430 Global Discussions
- 150 Industry Talk
- 490 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 154 Just for fun
- 74 Community Job Board
- 500 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives