3 steps

  1. Write the first formula in a spare cell referencing A23. Test it
  2. Write the second Formula in another cell referencing the first cell. Test it
  3. When it all works, Substitute the first formula into the second formula where it references the first one.