Skip to content
Astera Technology

Build a Calc report caption with optional details

Add punctuation together with each optional part.

Download complete case notes and answer keys ↓

Work with the example

Can the report title stay tidy when the room field is empty? B5 is the required Weekly review title, B6 is optional Desk detail and B7 is an optional room. D5 joins them using a separate IF for each optional part.

Supplied exercise data
PartBaseline
B5 titleWeekly review
B6 detailDesk
B7 roomTrue blank
D5 captionWeekly review — Desk

Edit the working cells

The working formula is =IF(B5="";"Title missing";B5&IF(B6="";"";" — "&B6)&IF(B7="";"";" / "&B7)). Fill B7 with Room A: the result adds / Room A. Clear B6/B7: it returns only Weekly review. Clear B5: it says Title missing.

Check the failure case

D8 always inserts both separators. At baseline it leaves a trailing / even though no room exists. Plain input text is content, not a template expression to execute.

Where should the room separator be added?

Show the worked answer

Inside the nonempty room branch, together with B7.

Example files

Related resources