Multiple 'If/Contains' Formula

Hi!

I am compiling a list of IP addresses that are associated with phyical sites. I am able to create a basic IF/Contains formula to populate the 'Location' column based on the 'IPv4' row.

Issue:

The issue I am running into is that I have many locations. If i keep the list small (20/30 locations), the formula works wonderfully. However, as I attempt to capture more granular location information, the formula becomes too big (65 sites, estimated 4,200 characters) & Smartsheet truncates the forumla.

Example:

IPv4 Location

192.168.1 New York City

192.168.2 Toronto

192.168.3 <Formula>

Sample formula I am using:

=IF(CONTAINS("192.168.1", [IPv4 Address]@row), "New York", IF(CONTAINS("192.168.2", [IPv4 Address]@row), "Toronto", <next IP>, <next IP>)

I believe I am reaching the limit of Smartsheet formula.

Is there an alternative approach to this?

Thank you in advance for any guidance & assistance with this.

Tags:

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!