00:00If you have been given a task to calculate the employee tenure, you can use one simple formula
00:04to do it. I'm going to use a formula called let, which allows me to store the date difference
00:08between today and the date in cell B3 and store it as year in variable A. The next variable I'll
00:14be using will be B, and basically do the date div again between today and cell B3, and present it
00:20as month using YM formatting. And then as a final argument on my let function, I'm going to use an
00:26if statement saying that if your variable value A is greater than 0, which means you have a couple
00:32of years, you're going to present the year value followed by the year, comma. If it's just zero
00:38years, we're going to basically insert blank. And after that, I'm going to concatenate the value in
00:42B, and after that, put a month at the back. And if you hit enter, this is what it looks
00:46like. And
00:47after that, you can apply the same formula to the rest of rows. And note, anybody who have less than
00:51a year is only presented with a month value.
Comments