You can troubleshoot a formula by simply looking at the prompts on the screen. The tooltip will tell you exactly where you are with regards to formula syntax and what is expected next.
Examples:

The cursor is in the middle of an AND() statement. The tooltip shows the current syntax element in bold. We are currently in the first logical condition of the AND(). The next expected entry is a comma and another logical condition. A closing bracket will close the AND() statement.
You continue with a closing bracket, so the AND() statement is closed and the formula continues with the next argument of the encasing IF() statement.

But you think you are still in the AND() function and provide another logical condition, which Excel interprets as the TRUE statement of the IF() function.

Excel now expects the FALSE statement of the IF function and then a bracket that closes the IF statement. You supply a cell reference and then a comma to continue with another IF. By this time you have entered too many arguments for the first IF statement. In the following screenshot, no argument is highlighted. Excel cannot place the current cursor position anywhere in the correct formula syntax.

If you watch the tooltips when you enter a formula, you can see that the AND statement was closed too early. Remove the superfluous brackets and see the tooltip now.

We are now in the FALSE statement of the first IF and start with another nested IF(). Continue in this way and see what the tooltip tells you and you will arrive at the correctly formed
=IF(AND(A2<H2),(A2>=0),G2,IF(AND(A2<H3,A2>=H2),G3),(IF(AND(A2<H4,A2>=H3),G4),(IF(AND(A2<H5,A2>=H4),G5),IF(AND(A2<H6,A2>=H5),G6)

Watching Excel's helpful tips can save an awful lot of time in troubleshooting.
IF()statements consider using aVLOOKUP()instead