2

I am using Google Sheets and I have two sheets in one document (SHEET1 and SHEET2). I want to be able to use a formula that allows me to:

  • If cell A1, B1, D1 and F1 in SHEET1 have an s in them

  • Then cell A1 in SHEET2 automatically inputs an s in it

Can this be done?

2 Answers 2

1

In SHEET2 in cell A1, add the following formula:

=IF(AND(Sheet1!A1="s";Sheet1!B1="s";Sheet1!D1="s";Sheet1!F1="s");"s";"invalid")

Is says:

If A1, B1, D1 and F1 in sheet 1 all contain an s then write s else write invalid

2
  • 1
    I think you are missing the fact that the cells A1, B1, etc. are in a different sheet (ie. SHEET1). In which case you need to prefix the cell references with SHEET1!.
    – MrWhite
    Commented Apr 15, 2013 at 11:18
  • @w3d I think you just added the 100th upvote on the google-spreadsheets tag
    – Jacob Jan
    Commented Apr 15, 2013 at 11:25
0

Slightly shorter:

=if(countif({Sheet1!A1:B1,Sheet1!D1,Sheet1!F1},"s")=4,"s","invalid")

IF
COUNTIF

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.