Avatar of Maryann Wood
Maryann Wood
Flag for United States of America asked on

Excel If Than statement.

I want to bring data from one spreadsheet to another, if a field is 'No', then pull comments from D5 over to another sheet.  

So one sheet - D5 is 'Yes' or 'No' - if 'No' and D6 are comments.  I would like the data to appear on another sheet.  

If 'Sheet1' - D5 = 'No' then pull data from 'Sheet1' - D2.   Thanks Experts.
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Zvonko

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Zvonko

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Zvonko

It states: if Sheet1.D5 is 'No' then copy Sheet1.D6 to this cell.


Rob Henson

Think the cell references should be other way round:

Formula in D6 =IF(Sheet1!D5="No",Sheet1!D2,"")
Rob Henson

If the formula is placed in cell D6 of Sheet1 you don't need the Sheet1 reference:

 =IF(D5="No",D2,"")
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Maryann Wood

ASKER
Thank you.  I was close, was missing the sheet name before D6.   I appreciate it.  Have a good day.
Zvonko

Thanks, you too  : )