Reputation: 11
I am having trouble understanding the IF statement. What I am trying to do is:
In Excel I'm using this formula:
=IFERROR(IF(A1+1<=$B$1,A1+1,""),"")
In Google Spreadsheet I'm using the same formula like above
=IFERROR(IF(A1+1<=$B$1,A1+1,""), "")
But the results are different. How can I get the same result in Google Spreadsheet and in Excel?
Upvotes: 1
Views: 835
Reputation: 50382
=IF(AND(A1+1<=$B$1,NOT(ISBLANK(A1))), A1+1,)
This is for GoogleSheets to replicate the same result as Excel.
Difference in results is because Sheets consider blanks as zero.
Upvotes: 4