Hey there stranger!

Sign up to get access.

Switch Data

About this Tutorial

We're going through the switch formula because in the past if I've ever had to change, say a day of the week or a month on the calendar to a number, or I have to change that number to the month or text, it's really hard.

Featured Formulas

Video Transcript

 Hello, welcome. So today we're gonna be looking at how to switch data. I think this is a really incredibly useful, uh, formula switch or ifs, uh, are doing similar things. But today we're gonna just go through the switch because in the past if I've ever had to change, say a day of the week or a month on the calendar to a number, or I have to change that number to the month or.

Text, it's really hard, and you might have been doing this in a similar way as I have, like I create a table of seven numbers one through seven, and Sunday through Saturday, or Monday through Sunday, however you wanna date your, uh, week. And then what I'll do is in order to get, say two, to get to Monday called V lookup, and I'll say V lookup, you know, based on this.

This and give me a second column, you know, and we can say, okay, this number four is gonna be Wednesday, or five is gonna be Thursday. But there's a lot of problems with that. What if I wanna switch it? What if, um, I wanna add more information or it's not so neat and easy. Maybe it's a, um, sun, m o n t u e. Um, there's a lot of issues with this and it's also.

a little clunky if you've never used V lookup, right? Um, here we have a, a table of the day, uh, the not day days, but the months and names of months, and maybe it's not, it's always not so clean. Maybe you have a list of data of January, February, March, but you have them all different types of ways you, uh, have to collect that.

So if you wanna also maybe change the city abbreviations to city names. There's a lot of different ways you can use this formula and I'll show you what you're using doing. So we have a list of the number of the months and we wanna change it to the month. Again, I can do the lookup and I have to create a table and another sheet, but I just wanna do that here.

So we use switch, we go equals switch. And the first thing we're doing here, we can look at what we're doing. We're gonna look. What the expression is, and then based on whatever the answer is, we're gonna change it to what it is. So first case, we're gonna change it to that second case, we're gonna change it to that and so on and so on.

We can add as many as we want here. So in this case, we're gonna say a 21, and let's click, we call this out. The case is if it's one Ahma genu, uh, January Ahma two. February. See, what we're doing is we're listing right here inside the cell what to do. We don't have to create another, we can keep going April and everything.

We don't have to create a table. We've created essentially a map or a table right here in this formula. Now we can take this formula and move it down, and if we have to make any. We can make edits all in this formula. We don't have to go to another sheet. We don't have to create a table. Um, we don't have to use a V look format.

Um, formula. We can do a switch right here and the same on the way, the bumper way. We can do switch equals switch, and then we say, what are we switching? We're switching D 21. If it's January. Yeah, it's spell. It's January. Switch it to one. It's at February

two. If it is March, change it to three. And across here we can change the dates or the day of the month name to a data point. Uh, a. This is really useful if maybe you're changing first two, one second, two, two, third, two, three. You wanna change like a, uh, maybe even if you want to change the rank, 1, 2, 3, 4, 5 into first, second, third, fourth, fifth for a summary page.

A lot of really fun uses for this. It's an incredibly useful to use switch. Um, if you wanna change the. Of the week to numbers or vice versa, change the month, change city abbreviations to city names, or even change city names to abbreviations, all types of useful cases. If you're looking for more ways to make your sheets better, check out better sheets.co.

Uh, there's free tutorials right now for you there. Thanks for watching.