A percentage of what? Are you having problems with the calculation or with the conversion (formatting) for display?
Reverend Jim
Carpe per diem
3,590 posts since Aug 2010
Reputation Points: 561
Solved Threads: 445
Skill Endorsements: 32
Let's say you have a group of 147 people and 36 are female. That means that the fraction of people who are female is 36/147. The percentage of females is one hundred times that. So
Dim people As Integer = 147
Dim female As Integer = 36
Dim percent As Double = 100.0 * female / people
'format as floating point with two decimal places
MsgBox(percent.ToString("F2") & "%")
Reverend Jim
Carpe per diem
3,590 posts since Aug 2010
Reputation Points: 561
Solved Threads: 445
Skill Endorsements: 32
Question Answered as of 9 Months Ago by
Reverend Jim
and
M.Waqas Aslam