r/excel 4h ago

How to tell Excel to leave the cell blank if criteria is not met? solved

My excel skills are RUSTY and I'm trying to simplify a spreadsheet for my work.

I have one column that tells me the days between a proposal is sent and when it's sold.

HOWEVER the sheet also shows when something is "pending" so it will have no sold date yet. I'm trying to figure out what's the simplest formula of "if that cell does not say "sold" then leave this cell blank and ignore the DAYS formula."

Is that possible? And if so, what would I use?

EDIT: Thank you u/Shiba_Take for giving me the formula! Nice and simple, and after you showed me where I messed up on it, my spreadsheet is lookin' fly. I am so excited, this spreadsheet is full of SO MUCH DATA and it's plagued my office since before I came. Now I can help streamline everything. Y'all are my heroes!!!

2 Upvotes

8 comments sorted by

u/AutoModerator 4h ago

/u/st0dad - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

6

u/Shiba_Take 80 4h ago

Try

=IF(x="sold", y, "")

2

u/st0dad 4h ago edited 4h ago

That makes sense! I'm missing something though and I'm not sure what...

=IF([@Status]"sold",=DAYS([@[Date Closed]],[@[Date Sent]]),"")

is what I put, and it says the formula's incorrect and I just... don't see where it's incorrect.

2

u/Interesting-Head-841 4h ago

What’s the @ and the bracket? Are you using a pivot table? Shiba’s suggested formula is the right suggestion

1

u/st0dad 3h ago

I had my ='s in the wrong spot, and didn't realize I could remove one of them. I feel like such a baby in excel, I've seriously forgotten everything I learned since my last job didn't use it at all.

3

u/Shiba_Take 80 4h ago
=IF([@Status] = "sold", DAYS([@[Date Closed]], [@[Date Sent]]), "")

You're missing = in one place and have an= in another place where it shouldn't be.

1

u/st0dad 3h ago

AH!!!! that was it!!!!!

Thank you so much. I watched with teary eyes as the cell that were supposed to be blank, went blank.