You have indeed interpreted the Excel formula correctly, but there are three things that stop your code from being "correct Java".
- Expressions like "P","F"and so on don't really have any effect sitting by themselves between{and}.  The thing about the Excel formula is that it actually has a value; and that's something that a series of Javaifandelsestatements don't actually have.  If you want a value, you could either write all of this as a Java method that returns a value, or you could use the ternary operator? :to create a single expression with the value that you desire.
- To compare strings in Java, you almost always want to use the equalsmethod, instead of the==operator.  The reason is that two differentStringobjects might have the same value; but in this case,==will returnfalsefor them, butequalswill return true.
- It's not clear what type R3is.  At one point, you treat it as if its type wereString, and at another point, you treat it as a numeric variable.  Unlike Excel formulas, any expression in Java has a well defined data type.
Translating the formula into a Java expression, and being careful of these three issues, we get something like this.
d3.equals("Feather") ? 
    ((i3 > 1000 || r3.equals("n/a")) ? "" : 
      w3.equals("F") ? "F" : 
      (i3 <= 1000 && Integer.parseInt(r3) > 8) ? "F" : "P" ) : "" 
But this is a bit hard to read, because there are too many ternary operators.  Most people would prefer to write this as a method, something like this.
public String excelFormula(String d3, int i3, String r3, String w3) {
    if (d3.equals("Feather")) {
        if (i3 > 1000 || r3.equals("n/a")) {
            return "";
        } else if (w3.equals("F")) {
            return "F";
        } else if (i3 <= 1000 && Integer.parseInt(r3) > 8) {
            return "F";
        } else {
            return "P";
        }
    } else {
        return "";
    }
}