Skip to main content

Nesting 6 IF statements to find Star Rating

  • April 18, 2022
  • 4 replies
  • 45 views

Hello, I’m trying to figure out how to express the below in Airtable.

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

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • April 18, 2022

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.


  • Author
  • New Participant
  • April 18, 2022

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.


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.


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • April 18, 2022

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.


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


  • Author
  • New Participant
  • April 18, 2022

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


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,
									"⭐️⭐️⭐️⭐️⭐️"
								)
              )
				  )
      )		
  )
)```