When we want to cre­ate a star rat­ing in Excel, there is at least one pos­si­ble solution.

How to cre­ate a star rat­ing in Excel in 3 minutes

We want to use stars from the Unichars, Uni­code. We just need to use the UNICHAR func­tion and a prop­er uni­code (Fig. 1).

Fig. 1 UNICHAR function

In old­er ver­sions of Excel, copy­ing those stars from the Inter­net should also work. We just have to have the signs we want to repeat. As we can see, we already have num­ber rat­ing. The biggest num­ber is five, and the low­est is zero and there is a prop­er num­ber of stars next to them. Let’s delete them how­ev­er, and start cre­at­ing a prop­er for­mu­la from the begin­ning. We start with the REPT func­tion. We write G4 because our text string is there, then press the F4 key to lock it. When we want to add the num­ber of times we want to repeat, we write C2, which is in the Rat­ing col­umn. Then, we close the for­mu­la (Fig. 2).

=REPT($G$4,C2)

Fig. 2 REPT function

We can copy it down and we have our black stars (Fig. 3). 

Fig. 3 Start rating

How­ev­er, we assumed that we always want to have five stars. It means that if the rat­ing is low­er than five, we have to add some white stars. In such a case, we just have to com­bine one REPT func­tion with anoth­er REPT func­tion using an amper­sand. In the sec­ond REPT func­tion, we have to write G5 and press the F4 key to lock it. In the place on the num­ber of repeats, we have to write five minus C2 - a cell from the Rat­ing column. 

=REPT($G$4,C2) &REPT($G$5,5-C2)

Fig. 4 Two REPT func­tions com­bined with an ampersand 

When we tell the REPT func­tion to repeat zero times, it won’t repeat any­thing, i.e. it will return an emp­ty text string. In the case of a 5‑star rat­ing, we have five stars. How­ev­er, then it comes to a cell with zero, the REPT func­tion treats it the same as an emp­ty cell in most sit­u­a­tions (Fig. 5).

Fig. 5 Star rat­ing results

https://www.youtube.com/watch?v=Apu9OMrSxHA