Lots of IFS
If you have more than two categories to generate from your logical conditions, IF() becomes unwieldy. It is possible to generate as many categories as you like by nesting IF() inside other calls to IF(), but the code quickly becomes difficult to understand. Instead, Google Sheets provides a function called IFS() that lets you test for as many conditions as you like. It takes pairs of arguments as follows:
=IFS(condition1, "value if condition 1 is TRUE",
condition2, "value if condition 2 is TRUE", ...)
Bài tập này là một phần của khóa học
Google Sheets nâng cao
Hướng dẫn bài tập
In column H, pass six arguments to IFS() to calculate the status of kids in each row. If the woman
- has young kids, return
"young". - has no kids, return
"none". - has kids and does not have young kids, return
"old".
Bài tập tương tác thực hành
Biến lý thuyết thành hành động với một trong các bài tập tương tác của chúng tôi
Bắt đầu bài tập