Numbers - IFS function

I am using an IFS function in numbers to fill in a cell based on the selection in a separate cell. The function is working for all selections except "4d". Does anyone have suggestions on what could be happening?


IFS(A2="1a","1a Applying Knowledge of Content and Pedagogy", A2="1b", "1 bKnowing and Valuing Students", A2="1c","1c Setting Instructional Outcomes",A2="1d","1d Using Resources Effectively",A2="1e","1e Planning Coherent Instruction",A2="1f","1f Designing and Analyzing Assessments",A2="2a","2a Cultivating Respectful and Affirming Environments",A2="2b","2b Fostering a Culture for Learning",A2="2c","2c Maintaining Purposeful Environments",A2="2d","2d Supporting Positive Student Behavior",A2="2e","2e Organizing Spaces for Learning",A2="3a","3a Communicating About Purpose and Content", A2="3b","3b Using Questioning and Discussion Techniques",A2="3c","3c Engaging Students in Learning",A2="3d","3d Using Assessment for Learning",A2="3e","3e Responding Flexibly to Student Needs",A2="4a","4a Engaging in Reflective Practice",A2="4b","4b Documenting Student Progress",A2="4c","4c Engaging Families and Communities", A2="4e","4e Growing and Developing Professionally", A2="4f","4f Acting in Service of Students",A2="4d","4d Community")

Posted on Feb 14, 2024 5:45 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 14, 2024 8:48 PM

I pasted your formula into a table and tested it. Like you I was puzzled at first why 4d didn't work. Then I noticed when I input 4d into cell A2 that the result was right-aligned instead of left-aligned. That was the clue. Numbers was guessing that 4d means not Text but a Duration of 4 days. (Duration has handy input shorthand in the form 1w, 1d, 1h, 1m, 1s etc.)


The fix is easy. Just format A2 as Text and your formula will accept 4d.


Or if you can leave A2 as Automatic and type '4d. The leading apostrophe tells Numbers that you mean Text; it will disappear after you make the entry,


Your formula works fine as is, but remember you can use SWITCH instead, which is a little easier and shorter because you don't have to type all those = conditions.


SWITCH - Apple Support


Also, if you expect in the future to add/remove/change codes or descriptions, then you might find it easier to put the code, description in a separate two-column "lookup" table and use XLOOKUP to look up and insert the description.


XLOOKUP - Apple Support


SG



2 replies
Question marked as Top-ranking reply

Feb 14, 2024 8:48 PM in response to WillRewitz

I pasted your formula into a table and tested it. Like you I was puzzled at first why 4d didn't work. Then I noticed when I input 4d into cell A2 that the result was right-aligned instead of left-aligned. That was the clue. Numbers was guessing that 4d means not Text but a Duration of 4 days. (Duration has handy input shorthand in the form 1w, 1d, 1h, 1m, 1s etc.)


The fix is easy. Just format A2 as Text and your formula will accept 4d.


Or if you can leave A2 as Automatic and type '4d. The leading apostrophe tells Numbers that you mean Text; it will disappear after you make the entry,


Your formula works fine as is, but remember you can use SWITCH instead, which is a little easier and shorter because you don't have to type all those = conditions.


SWITCH - Apple Support


Also, if you expect in the future to add/remove/change codes or descriptions, then you might find it easier to put the code, description in a separate two-column "lookup" table and use XLOOKUP to look up and insert the description.


XLOOKUP - Apple Support


SG



Feb 14, 2024 7:30 PM in response to WillRewitz

Will,


Could you help us out by posting a Screen Shot of the table? Press "Shift-Command-4" and then click and drag over the area of the Numbers window you want to select. After a Preview window pops up, Press "Command-C" to copy the image to the Clipboard. Click in your response here and press "Command-V" to paste into the composition window. It might take a couple tries to get what you want if this is your first time grabbing the screen.


Thanks,


Jerry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Numbers - IFS function

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.