|Yes, VBA (macros) is the only way to do this.|
Before we can offer you some code, you need to clarify something for us.
You said: based on what value is in the cell in column AF.
Then you said: So if "1" is the value cell AF2...
Is AF2 the only cell that will need to be evaluated and have rows inserted below?
In other words, will it always be AF2 or might you need rows inserted after AF11 sometimes, AF25 some other times, etc.
How do you want the code to be triggered? Manually by clicking a button? Automatically as soon as the value is entered by the user? Automatically when the value is calculated by Excel? etc.