|Well, there's a bunch of stuff going on here.|
I'll answer your question first, then mention a few other things:
To only have your conditions apply when A848=A849 all you need to do is wrap another IF around your conditions, with your conditions being the value_if_true for the first condition:
=IF(A848=A849,IF(F849>G848," ",IF(F849=G848," ",IF(F849<G848,"ERROR"))),"")
That said, I'd like to point out a couple of things:
1 - You'll note that I used "" (2 double quotes right next to each other) as the value_if_false for the first condition (IF(A848=A849). "" is diferent than " " (2 double quotes with a space in between) which is what you used.
"" will put nothing in the cell while " " will put a space in the cell. While they make look the same i.e. a "blank cell" they are not the same.
2 - Let's look at your original formula:
=IF(F849>G848," ",IF(F849=G848," ",IF(F849<G848,"ERROR")))
That could be condensed to the following which will return "ERROR" if F849<G848 and return a space for the only other 2 conditions that could exist. In other words there is no need to check for the > or = conditions.
=IF(F849<G848, "ERROR", " ")
The following will give you a blank cell, not a cell with a space in it:
=IF(F849<G848, "ERROR", "")
Putting that all together, I believe this is the formula you are looking for:
=IF(A848=A849, IF(F849<G848, "ERROR", ""), "")