edge37
Board Regular
- Joined
- Sep 1, 2016
- Messages
- 102
- Office Version
- 365
- Platform
- Windows
Greeting! I have this question: I have a cell in which I need to show averages of grades, that includes 2 decimals, as percents, but I would like to format the cell for, when I have a 100% average, all decimals are removed, the rest of numbers will keep their decimals, EXCEPT 100%, which I want it to show without any decimals..
I'm using a VBA code and a formula for showing the averages in just one cell when I click a student's name:
In Format Cell>Number>Custom, I use 0.00%;;""
In the cell I use the formula:
Is this possible? Thanks for your help
Please advice if I have to send anything else to fully explain myself. The image illustrates the problem.
I'm using a VBA code and a formula for showing the averages in just one cell when I click a student's name:
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("AM9").Value = ActiveCell.Value
End Sub
Code:
=CELL("address")
In the cell I use the formula:
Code:
=IFERROR((VLOOKUP($AM$9,$B$9:$Z$33,19,FALSE)/100),0)
Please advice if I have to send anything else to fully explain myself. The image illustrates the problem.