Ok, here are the specifics: Sheet "Jan 2024" if F8 = Y then I8 =- D8-E8, if F8 = N the I8 = 0Your question is a bit vague, and I think needs a bit of clarification.
Where exactly is this "Y" you are looking for (on what sheet and in what cell)?
What sheet is this D8 cell reference referring to?
How many sheets are in your workbook?
Perhaps it would be best to show us an example of your data and expected output.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in
Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
=IF(F8="N",0,-D8-E8)
=IF('Jan 2024'!F8="N",0,-'Jan 2024'!D8-'Jan 2024'!E8)
Perhaps my description was so good. All on the same worksheet, I do not think that the worksheet name is needed.You would just have a formula something like this in cell I8:
Excel Formula:=IF(F8="N",0,-D8-E8)
Note that if this cell I8 that you are trying to update is on a different sheet than your D8, E8, and F8 references, then you would just need to add your sheet name reference in front of the range references, i.e.
Excel Formula:=IF('Jan 2024'!F8="N",0,-'Jan 2024'!D8-'Jan 2024'!E8)
=- D8-E8
=D8-E8
=IF(F8="N",0,D8-E8)
=IF(F8="No",0,D8-E8)
I know, sorry. Let's us Y and NYeah, you seem to keep changing the question slightly!
Is it "Y" and "N", or "Yes" and "No"?
And initially you had:
and now it is:Excel Formula:=- D8-E8
Excel Formula:=D8-E8
So I am guessing now you need either:
orExcel Formula:=IF(F8="N",0,D8-E8)
depending on whether or not your values are really "N" or "No".Excel Formula:=IF(F8="No",0,D8-E8)