Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to add 5 star rating cell using MS excel

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 09-07-2011
Member
 
Join Date: May 2011
Posts: 58
How to add 5 star rating cell using MS excel
  

I am new to this forum and I want to create a column which is having the a cell and in that cell there should be 5 stars in the cell and in this you can also click on the stars as it is provided on various websites or it is similar to the ratting application. So is there any application in which I can do ratting. So where can I find this application. I find the application but I was not able to find it. Please help me in solving the problem. Thanking all in advanced for helping me.

Reply With Quote
  #2  
Old 09-07-2011
Member
 
Join Date: Jun 2009
Posts: 1,518
Re: How to add 5 star rating cell using MS excel

I was having the same scenario I asked by programmer friend and he told me that you have to use a simple formula such as the A1: =REPT (CHAR (171), B1) in which the in which the A1 stands for the cell to the holding ratings and the B1 stands for the data validation and for the option of the list or the list option and the list should be in list = 1, 2, 3, 4, 5 then you have to set the A1 to their alternative wingding?s and then you should use the formula that is given to you.
Reply With Quote
  #3  
Old 09-07-2011
Member
 
Join Date: Nov 2008
Posts: 1,514
Re: How to add 5 star rating cell using MS excel

I was also having the same problem but in this case I was trying to do some rating in excel and the rating is in this type
1 star- better
2 star-very well
3 star- good
4 star- best
5 star - excellent
You have to just follow the code:
Code:
Private Sub change ()

With Range ("B2")
    If .Value = "GOOD" Then
    Range ("C2").Value = "1"
    Else
    End If
End With

End Sub
Reply With Quote
  #4  
Old 09-07-2011
Member
 
Join Date: Mar 2009
Posts: 1,360
Re: How to add 5 star rating cell using MS excel

If you are able to put the numbers or the ratings in the separate cell then you have to just use the formula REPT (CHAR (182), A1) this is the formula and it is still formatted in the Wingding?s and in this case this formula will display multiple stars. If in this case you have to format the star then you have to format each star and you can format the star by using the formula and then you have to select the characters and then the formula bar and then select the formats and then change the font color and the cell color.
Reply With Quote
  #5  
Old 09-07-2011
Member
 
Join Date: Nov 2008
Posts: 1,259
Re: How to add 5 star rating cell using MS excel

From the discussion going on if the problem is not solved with the help of the formula, and then you can solve the problem by using the code. The code is as follows:
Code:
Option Explicit
Private Sub Workbook_Open()
Sheet1.RemoveHs
End Sub

Option Explicit
Dim SC As Long
Dim Lc, Tc As Long
Dim Grade, i As Long
Dim H, H1, H2, H3, H4, H5 As Shape

Private Sub Worksheet_Activate()
[B:B].Font.ColorIndex = 2
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With ActiveSheet

If Target.Column > 1 Then
RemoveHs
Exit Sub
End If

If Target.Count > 1 Then
RemoveHs
Exit Sub
End If

If Target.Value = "" Then
RemoveHs
Exit Sub
End If

Lc = Target.Offset(0, 1).Left
Tc = Target.Offset(0, 1).Top

SC = Shapes.Count

If SC > 0 Then
RemoveHs
AddHs
Else
AddHs
End If

End With

End Sub
Sub RemoveHs()

With ActiveSheet

SC = Shapes.Count

If SC > 0 Then
Shapes.SelectAll
Selection.Delete
End If

End With

End Sub
Sub AddHs()

With ActiveSheet

Set H1 = Shapes.AddShape(msoShape5pointH, Lc, Tc, 10,
10)
H1.Name = "H1"
H1.OnAction = "Sheet1.ClickH1"

Set H2 = Shapes.AddShape(msoShape5pointH, Lc + 12, Tc,
10, 10)
H2.Name = "H2"
H2.OnAction = "Sheet1.ClickH2"

Set H3 = Shapes.AddShape(msoShape5pointH, Lc + 24, Tc,
10, 10)
H3.Name = "H3"
H3.OnAction = "Sheet1.ClickH3"

Set H4 = Shapes.AddShape(msoShape5pointH, Lc + 36, Tc,
10, 10)
H4.Name = "H4"
H4.OnAction = "Sheet1.ClickH4"

Set H5 = Shapes.AddShape(msoShape5pointH, Lc + 48, Tc,
10, 10)
H5.Name = "H5"
H5.OnAction = "Sheet1.ClickH5"

End With
ColouredHs
End Sub

Sub ColouredHs()

Grade = ActiveCell.Offset(0, 1).Value

For Each H In ActiveSheet.Shapes
i = Right(H.Name, 1)
If i <= Grade Then
H.Fill.PresetGradient msoGradientDiagonalUp, 1,
msoGradientGold
End If
Next H

End Sub
Sub ClearHs()
For Each H In ActiveSheet.Shapes
H.Fill.Solid
H.Fill.ForeColor.SchemeColor = 9
Next H
ColouredHs
End Sub
Sub ClickH1()
ActiveCell.Offset(0, 1).Value = 1
ClearHs
End Sub
Sub ClickH2()
ActiveCell.Offset(0, 1).Value = 2
ClearHs
End Sub
Sub ClickH3()
ActiveCell.Offset(0, 1).Value = 3
ClearHs
End Sub
Sub ClickH4()
ActiveCell.Offset(0, 1).Value = 4
ClearHs
End Sub
Sub ClickH5()
ActiveCell.Offset(0, 1).Value = 5
ClearHs
End Sub
Reply With Quote
  #6  
Old 09-07-2011
Member
 
Join Date: Nov 2008
Posts: 1,185
Re: How to add 5 star rating cell using MS excel

While I was surfing on the internet I saw the questions and the suggestions I would like to recommend you that you should use the formula REPT (CHAR (182), A1) this formula will help you to change the cell color and then display the cell settings.
Reply With Quote
  #7  
Old 10-07-2011
Member
 
Join Date: May 2011
Posts: 58
Re: How to add 5 star rating cell using MS excel

Thank you for giving me the replies and now the problem has been solved for the 5 star rating cells using MS excel I solved the problem by just using the code that is suggested above and now I am just rating the cell and I also used use the formula REPT (CHAR (182), A1) and I am also able to change the color of the cell. And now I am changing the cell color and the I am also rating the cell stars.
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to add 5 star rating cell using MS excel"
Thread Thread Starter Forum Replies Last Post
How to disable excel for taking empty cell in Excel chart Hache hi MS Office Support 2 25-02-2012 12:30 PM
Applying absolute cell referencing to many cell in Excel Nyota MS Office Support 2 24-02-2012 07:23 PM
Cell format errors appears in Excel 2003 but not in Excel 2000 @nki$achi MS Office Support 1 24-01-2012 05:00 PM
How to restore cell gridlines lost after coloring the cell in Excel? Chitti's Windows Software 2 04-01-2012 06:54 PM
Is it possible to use the star rating in photo viewer Zared Windows Software 4 30-12-2010 01:01 AM


All times are GMT +5.5. The time now is 03:57 AM.