I prefer to do it with VBA code because I find it easier to manage, but it's also possible without VBA using just the built-ins in the spreadsheet directly.