There are many ways round the limit of 7 nested IFs - post an example
of your formula and a more fullsome description of what you want to
achieve, and someone will be able to help you.
I could see by examining what you wanted to do that the only variable
was the row number for column P and that this was related to the value
in B2. The INDIRECT function allows you to use a calculated cell
reference, so it was then obvious how to convert your formula. Often,
you would use a lookup table to replace multiple IFs, but that wouldn't
work in this case as it was the cell reference you wanted to change
rather than just a value.