Help

Nesting 6 IF statements to find Star Rating

Topic Labels: Formulas
748 4
cancel
Showing results for 
Search instead for 
Did you mean: 
jterrell
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello, I’m trying to figure out how to express the below in Airtable.
CleanShot 2022-04-18 at 10.22.20

I took inspiration from this thread

This is what I have so far…

IF (
	{CALCULATED SCORE} < 1, 
	“0”,
	IF(
		{CALCULATED SCORE} < 2.2,
		“⭐️”,
		IF(
			{CALCULATED SCORE}  < 4.5,
			“⭐️⭐️”
				IF(
					{CALCULATED SCORE} < 6.9,
					“⭐️⭐️⭐️”
						IF(
							{CALCULATED SCORE}  < 8.9,
							“⭐️⭐️⭐️⭐️”
								IF(
									{CALCULATED SCORE}  < 10,
									“⭐️⭐️⭐️⭐️⭐️”
									)
								)
							)
						)
					)
				)
									
4 Replies 4

Welcome to the Airtable community!

Are you having problems with the formula you created? Do you have a specific question that you want to ask?
It looks like you are showing 0 when the score is below 1, but you want a blank. You can use an empty text string "" instead of "0" if that is what you want.

jterrell
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks for the welcome. 😃

Yes, it’s not working and I’m getting an error. Correct, if under 1 then no stars are added.

This is the error I’m getting.
CleanShot 2022-04-18 at 10.44.10

Convert your curly quotes “ ” to straight quotes " " .

jterrell
5 - Automation Enthusiast
5 - Automation Enthusiast

I corrected the quotes, still got an erorr… then i noticed I was missing a comma after each statement. lol It’s the little things. Thanks for the help!!

IF(
	{Calculated Rating} < 1, 
	"",
	IF(
		{Calculated Rating} < 2.2,
		"⭐️",
		IF(
			{Calculated Rating} < 4.5,
			"⭐️⭐️",
				IF(
					{Calculated Rating} < 6.9,
					"⭐️⭐️⭐️",
						IF(
							{Calculated Rating} < 8.9,
							"⭐️⭐️⭐️⭐️",
								IF(
									{Calculated Rating} < 10,
									"⭐️⭐️⭐️⭐️⭐️"
								)
              )
				  )
      )		
  )
)```