Switch Rows with Columns — data transposing

Today, we want to learn how to trans­pose our data, i.e. how to switch columns with rows. 

Switch Rows with Columns — data transposing 

We have two solu­tions to choose, a sta­t­ic one and a dynam­ic one. 

Let’s use the first one. We need to copy our data (1) and then right click on our tar­get cell (2). From the pop-up menu, we select the Trans­pose option (3) (Fig. 1)

Transpose option
Fig. 1 Trans­pose option

We can see that our data has been trans­posed (Fig. 2)

Fig. 2 Trans­posed data

Now, let’s use the dynam­ic solu­tion. Here, we just use the TRANSPOSE func­tion and select the array we want to trans­pose (Fig. 3)

=TRANSPOSE(A1:B6)

TRANSPOSE function
Fig. 3 TRANSPOSE function

And we have our data trans­posed. How­ev­er, we can see here that Excel did­n’t copy the cell for­mat­ting. If we want the same for­mat­ting, we should copy it from some­where else (1) using the For­mat Painter (2) option, and use it in the tar­get place (3) (Fig. 4)

Copying the cell formatting
Fig. 4 Copy­ing the cell formatting

When we change some­thing in our orig­i­nal data, the data in the sta­t­ic solu­tion won’t change, but the func­tion will. 

In ver­sions old­er that the Dynam­ic Array Excel, we should select a prop­er range before putting the for­mu­la in a cell, then press the Ctrl + Shift + Enter com­bi­na­tion to enter it as an array formula. 


https://www.youtube.com/watch?v=sT7ShlUemPc

Rounding time to the nearest 15 minutes MROUND, FLOOR or CEILING functions

Do you want to round the work­ing time to the near­est 15 min­utes? I will show you how to do it.

Round time to near­est 15 min­utes MROUND, FLOOR or CEILING functions

We can round our work­ing time to the near­est mul­ti­ple of 15 min­utes. In most cas­es, when we round in Excel and reach the mid­dle point, we start to round up. In the case of 15 min­utes, the mid­dle point is 7.5 minute. Now, let’s start the round­ing. It’s a sim­ple task. We can just use the MROUND func­tion, write the num­ber, which in our case will be the time, and then write the mul­ti­ple as time, i.e. in dou­ble quotes. In this case, the first two dig­its cor­re­spond to hours, and the last two ones cor­re­spond to min­utes. If we need sec­onds, we just write them fur­ther (Fig. 1)

=MROUND(A2,“00:15:00”)

MROUND function
Fig. 1 MROUND function

Now, let’s check our time. In the first three exam­ples, we did­n’t reach the mid­dle point, so we go down. How­ev­er, after we pass the mid­dle point, which is shown as a thresh­old, we start round­ing up. In the last but one exam­ple, we have exact­ly the same val­ue, so we leave it just as it is. How­ev­er, in the very last exam­ple, we did­n’t reach the next mid­dle point, so we still round down (Fig. 2)

Rounding with the MROUND function
Fig. 2 Round­ing with the MROUND function

Some­times, we always want to round down. In this case, we can use the FLOOR func­tion. In the first argu­ment, we have to write the time. In the sec­ond one, which is called sig­nif­i­cance, we write the same mul­ti­ple as in the MROUND func­tion, which is time in dou­ble quotes (Fig. 3)

=FLOOR(D2,“00:15”)

FLOOR function
Fig. 3 FLOOR function

In this case, we always want to round down. It means that even when we go to halfway, we still go down. What’s more, even if we are very close to the next mul­ti­ple, like in the last but one exam­ple, we still round down. Even, when we pass the mul­ti­ple, we still round down, but this time to the next mul­ti­ple, as in the last exam­ple (Fig. 4)

Rounding with the FLOOR function
Fig. 4 Round­ing with the FLOOR function

When we want to round up, we can use the CEILING func­tion. We write the same argu­ments as in the pre­vi­ous func­tions. In this case, it’s enough if we pass the pre­vi­ous mul­ti­ple by only one sec­ond, and the round­ing will go up. More­over, when we pass the next mul­ti­ple by only a tiny bit, let’s say one hun­dredth of a sec­ond, we will go up to the next mul­ti­ple (Fig. 5)

Rounding with the CEILING function
Fig. 5 Round­ing with the CEILING function

Sum­ming up, when we use the CEILING func­tion, we always go up. When we use the FLOOR func­tion, we always go down. And when we use the MROUND func­tion, we go to the near­est mul­ti­ple. The most impor­tant is the mid­dle point. We can, of course, write any time we want in the sec­ond argu­ment of those functions.

https://www.youtube.com/watch?v=9cef0-9mkBI

How to Create A Pareto Chart 

Do you want to put a Pare­to chart in Excel? I will show you how.

How to Cre­ate A Pare­to Chart 

If you want to put a chart on which you have columns that rep­re­sent income and a line that rep­re­sents the cumu­la­tive per­cent income, fol­low me. 

From Excel 2016, you can sim­ply go to the Insert tab and choose the Pare­to chart from the His­togram com­mand (Fig. 1)

Inserting a Pareto chart
Fig. 1 Insert­ing a Pare­to chart

And you have the Pare­to chart ready. How­ev­er, the charts from Excel 2016 have some draw­backs. The line isn’t an actu­al series of the chart. It means that we can­not add data labels there. That’s why I don’t pre­fer using this type of chart. What I pre­fer is the ear­li­er ver­sion that gives me more free­dom con­cern­ing val­ue chang­ing, although it requires more cal­cu­la­tions. We have to cal­cu­late the cumu­la­tive per­cent income on our own (Fig. 2)

=SUM(B$2:$B2)/SUM($B$2:$B$9)

Cumulative percent calculations
Fig. 2 Cumu­la­tive per­cent calculations

Now, we can insert a sim­ple col­umn chart. Since the income is enor­mous­ly big­ger that the per­cent­age, we aren’t able to see the income columns at all, but we want to select them (Fig. 3). How can we do it?

No % Income columns
Fig. 3 No % Income columns

We can select our chart and go to the For­mat tab. On the left we can see all ele­ments of the chart. We are inter­est­ed in the Series “% Income” option (Fig. 4)

Series "% Income"
Fig. 4 Series “% Income”

We can see now that the series is select­ed on the chart. Let’s press Ctrl + 1 and go to For­mat Data Series, Series Options, Plot Series On, and select the Sec­ondary Axis option. Now we have % income on a dif­fer­ent axis (Fig. 5)

Secondary Axis options
Fig. 5 Sec­ondary Axis options

Now, we can change the chart type into a chart that will rep­re­sent income bet­ter. We have to click on the chart ele­ment once, then go to the Insert tab and the Line chart with Mark­ers option (Fig. 6)

Line Chart with Markers
Fig. 6 Line Chart with Markers

Since we are cre­at­ing a Pare­to chart our­selves, the val­ues aren’t sort­ed and we have to do it man­u­al­ly. We just select one cell in our data, then go to the Data tab and choose the from Z to A option (Fig. 7)

 Data sorting
Fig. 7 Data sorting

Now the data on the chart is nice­ly sort­ed and it looks more like a Pare­to chart. We still have to add mod­i­fi­ca­tions to make it a real Pare­to chart. First of all, let’s select a col­umn and press Ctrl + 1. On the right, we have the Gap Width option. Let’s slide it to 0%. Now, let’s go to the sec­ondary axis. It goes up to 120%, how­ev­er our max­i­mum is 100% (Fig. 8)

Gap Width modification
Fig. 8 Gap Width modification

We have to select the axis, press Ctrl + 1, go to Axis Options and write 1 in the Max­i­mum bar, which equals 100%. We also change our Major Units to 0.2 which means that there will be less per­cent num­bers showed on the axis (Fig. 9)

Less percent numbers
Fig. 9 Less per­cent numbers 

We still don’t need the 0 after dot in our per­cent­ages, so let’s go to Num­bers and change the For­mat Code from 0.0% to 0% and click Add (Fig. 10)

Format Code change
Fig. 10 For­mat Code change

Now, let’s go to the Income For­mat Axis. Press the axis and Ctrl + 1. Let’s change the Major from 100000 to 200000. This way the chart will show less num­bers (Fig. 11)

Less numbers
Fig. 11 Less numbers

What I care about the most right now are data labels for the line. Let’s click once on the line, click on the plus sign and we have Data Labels option. Let’s place them above our line (Fig. 12)

Data Labels
Fig. 12 Data Labels

We still need to set a prop­er title. Let’s just write Pare­to. After imple­ment­ing the most impor­tant changes, the Pare­to chart looks like that (Fig. 13)

Finished Pareto chart
Fig. 13 Fin­ished Pare­to chart

https://www.youtube.com/watch?v=wL2yeXCeL2Y

Round to nearest multiple MROUND, FLOOR or CEILING functions

Do you want to know how to round num­bers? Fol­low me.

Round to near­est mul­ti­ple MROUND, FLOOR or CEILING functions

Let’s assume I get paid for cor­rect­ing text and I don’t want to work with tiny amounts, like indi­vid­ual cents. What may help me is round­ing the num­ber of char­ac­ters checked by me in a giv­en text. When I round it, my income will be round­ed as well. Let’s assume that I want to round to the near­est mul­ti­ple of 200. In stan­dard Excel round­ing, when we go to the mid­dle of the num­ber, which in our case is 100, the round­ing starts to go up. It means that when we use, e.g. the MROUND func­tion to round the near­est mul­ti­ple of 200, in the case of 2349 we go up because we passed the thresh­old of 2300. How­ev­er, in the case of 2499, we go down. Why? Because we haven’t reached the mid­dle point. But when we reach the mid­dle point, which in this exam­ple is exact­ly 2500, we go up. In order to go up, we only have to reach the mid­dle point, and when we don’t reach this point we go down. It means that it’s even for me and for my cus­tomer (Fig. 1) 

Threshold and rounding
Fig. 1 Thresh­old and rounding 

Some­times, there are sit­u­a­tions that I always want to round down or always round up. Let’s assume that round­ing down will be a lit­tle bit nicer to my cus­tomer, and round­ing up will be nicer for me. How can we do it? In Excel, when we always want to round down, we can use the FLOOR func­tion (Fig. 2)

=FLOOR(D2,200)

FLOOR function
Fig. 2 FLOOR function

We have to remem­ber that we are still using the round­ing to the near­est mul­ti­ple of 200. Our round­ing goes down even if we passed the halfway. Even, when we are very near and almost reached the point of the mul­ti­ple, and even if the dif­fer­ence is a very small frac­tion of an inte­ger, like in 2599.999, we still go down. And when we reach the near­est mul­ti­ple, which is 3000 in our case, it becomes our base and we will still go to this base until we reach the next base, which is the next mul­ti­ple of 200 (Fig. 3)

Rounding down
Fig. 3 Round­ing down

When we want to always go up, we can use the CEILING func­tion, where we also give it a num­ber and sig­nif­i­cance, i.e. a mul­ti­ple, as it was with the FLOOR func­tion (Fig. 4)

=CEILING(G2,200)

CEILING function
Fig. 4 CEILING function

When we pass our next mul­ti­ple, we always go up. Even if the num­ber passed the near­est mul­ti­ple by only a small frac­tion, like 30000.0001, we still go up (Fig. 5)

 Rounding up
Fig. 5 Round­ing up

Of course, 200 is only an exam­ple of a mul­ti­ple for those func­tions. We can write there 500, or use even dec­i­mal num­bers, like 0.5 or 1.5. How­ev­er, the exam­ple above used sim­ple, hole numbers.

https://www.youtube.com/watch?v=7M72csPv36Q

Chart Secondary Axis

Today, we are going to talk about putting two dif­fer­ent series into one chart.

Sec­ondary Axis on Excel Chart Tem­per­a­ture and rainfall

If you have two series that dif­fer from each oth­er, e.g. they have dif­fer­ent units or one of them is much big­ger than the oth­er, then you should use the Sec­ondary Axis on you chart. How can you do it? From Excel 2013 the task is sim­ple as Microsoft insert­ed the Com­bo chart. Our exam­ple has sim­ple data, so we just have to click on one cell, then go to the Insert tab, where we can find a Com­bo chart with the Sec­ondary Axis (Fig. 1)

Combo chart with secondary axis
Fig. 1 Com­bo chart with sec­ondary axis

I can see that not every­thing is as I want­ed, that’s why I’m going to make some changes. I just select the chart and go to the Chart Design tab, where I can find the Change Chart Type option. In the win­dow that appeared, we change the type of each series. The rain­fall is on the sec­ondary axis, which is good, how­ev­er, I pre­fer the rain­fall to be pre­sent­ed as a col­umn chart, and I will put the tem­per­a­ture into a line chart with mark­ers (Fig. 2)

Column chart and line chart with markers
Fig. 2 Col­umn chart and line chart with markers

After press­ing OK, we can see a fin­ished chart with two val­ues (Fig. 3)

A finished chart with two values
Fig. 3 A fin­ished chart with two values

But, how can we do it in Excel from before 2013? Let’s insert a sim­ple col­umn chart by going to the Insert tab, then choos­ing the prop­er col­umn chart (Fig. 4)

Column chart
Fig. 4 Col­umn chart

As our val­ues dif­fer much in size, where the rain­fall is sig­nif­i­cant­ly big­ger than the tem­per­a­ture, I would like to have the rain­fall series on a sec­ondary axis. I have to select the hole series by click­ing once on the series ele­ment, then press Ctrl + 1, find the series option, go to Plot Series On, and choose Sec­ondary Axis (Fig. 5)

Series options
Fig. 5 Series options

And, just like that we have a dif­fer­ent axis for rain­fall, and a dif­fer­ent axis for tem­per­a­ture. There is still one thing we need to change, which is the type of tem­per­a­ture series, because now one series is behind the oth­er and we don’t know how high some columns are. Let’s click one time on the series and go to the Insert tab, where we can choose a new chart type. Let’s choose the Line with Mark­ers option (Fig. 6)

Line chart with markers
Fig. 6 Line chart with markers

Just like that, I have a chart with a sec­ondary axis and dif­fer­ent chart types. Let’s change the name of the chart into Tem­per­a­ture and rain. The chart is fin­ished (Fig. 7)

Finished chart
Fig. 7 Fin­ished chart

https://www.youtube.com/watch?v=L7K2_jejIHg

Bankers Rounding (Half-Way-Even) to Dollars, Pennies and Hundreds

Today, we are going to talk about bank round­ing, or half-way-even rounding.

Bankers Round­ing (Half-Way-Even) to Dol­lars, Pen­nies and Hundreds

In a clas­sic Excel round­ing, if we have 5 as the most sig­nif­i­cant num­ber for us, we always go up. It means that errors go up. To make the dis­tri­b­u­tion of our round­ings a bit more even, we some­times need to go down. That’s why we have the bank round­ing which goes around the near­est, even num­ber. Let’s take the num­ber of 7.50. Our whole num­ber, which is 7, is an odd num­ber. By round­ing up, we go to the near­est, even num­ber, which is 8. How­ev­er, if our whole num­ber is even, like in 8.50, we go down to 8. The dis­tri­b­u­tion of the round­ing val­ues is more even, which means that an error is less sig­nif­i­cant. It’s impor­tant espe­cial­ly in bank­ing, that’s why we call it bank round­ing (Fig. 1)

Rounding to the nearest, even number
Fig. 1 Round­ing to the near­est, even number

How can we use it in Excel, when we know that the stan­dard ROUND func­tion will always go up if the most sig­nif­i­cant num­ber is 5. The answer is that we have to cre­ate a dif­fer­ent for­mu­la. The for­mu­la that works for me, where I haven’t seen any errors is a bit com­pli­cat­ed, how­ev­er, when we start work­ing with this, it will be quite easy to under­stand. First, we have to check whether our num­bers are half way or not. We can see that two num­bers are half way. In the remain­ing ones, the sit­u­a­tion is clear, i.e. we know that we want to go up or down (Fig. 2)

Halfway numbers
Fig. 2 Halfway numbers

If we want to check whether to go up or down, we can use the MOD func­tion, where we should write 1 to check what the divider is, i.e. we want to check what is the rest after divid­ing it by 1 (Fig. 3)

=MOD(A2,1)

MOD function
Fig. 3 MOD function

We can see the results (Fig. 4)

MOD function results
Fig. 4 MOD func­tion results

If the num­ber is halfway, we need to round it to the near­est whole num­ber. It means that we have to check whether the result of the MOD func­tion is equal to 0.5. If it is, we should use the MROUND func­tion that returns the desired num­ber round­ed to the desired mul­ti­ply of even num­bers from our exam­ple. It means that we want to round 207.50 to the near­est mul­ti­ply of even num­bers, which is 2. In oth­er cas­es, we just use the ROUND func­tion to whole num­bers. In our case, the num­ber of dig­its is 0 (Fig. 5)

=IF(MOD(A2,1)=0.5,MROUND(A2,2),ROUND(A2,0))

Proper formula
Fig. 5 Prop­er formula

Look­ing at the results, we can see that when we have an odd, whole num­ber and we are halfway, we go up to the near­est even num­ber. If we have an even num­ber and we are halfway, we go down to the near­est, even num­ber. How­ev­er, if we pass the halfway thresh­old, we start to go up (Fig. 6)

Even and odd numbers in data
Fig. 6 Even and odd num­bers in data

Now, let’s go to the round­ing to 100. We copy our pre­vi­ous for­mu­la, which aimed at round­ing to whole num­bers. Now, we want to round to 100, which is 100 times more than in the pre­vi­ous exam­ple. It means that we have to mul­ti­ply all num­bers in our for­mu­la by 100 (Fig. 7)

=IF(MOD(E2,100)=50,MROUND(E2,200),ROUND(E2,-2))

Multiplication by 100
Fig. 7 Mul­ti­pli­ca­tion by 100

And just like that we have prop­er results. We went halfway in two cas­es. Since we’re round­ing to 100, we went up in the num­ber 2350. In the sec­ond halfway num­ber, which is 2450, we already had an even num­ber, so we went down to the near­est even num­ber (Fig. 8)

Rounding to 100
Fig. 8 Round­ing to 100

If I change num­bers in the last exam­ple and pass the halfway thresh­old, we can see that the round­ing goes up (Fig. 9)

Rounding goes up
Fig. 9 Round­ing goes up

If we want to use the bank round­ing to dec­i­mal places, e.g. for pen­nies, it will be a bit more prob­lem­at­ic. Here, we have to remem­ber that we are check­ing the sec­ond dig­it to know whether it’s an even val­ue. If the dig­it is odd, we round up, and if the num­ber is even, we go down to the near­est even num­ber. We have to remem­ber that if we pass the halfway thresh­old, we start to go up (Fig. 10)

Rounding with decimal places
Fig. 10 Round­ing with dec­i­mal places

If we want to work with this banker’s round­ing rule with dec­i­mal places, we can­not use the MOD func­tion because, when we work with e.g. pen­nies, the MOD func­tion results will have some inac­cu­ra­cies in dig­its that are far away, like on the fif­teenth place after the dot, or so. In such a sit­u­a­tion we won’t be able to check whether it is halfway, because the far places show that it’s not (Fig. 11)

Inaccuracies in digits
Fig. 11 Inac­cu­ra­cies in digits

When we work with whole num­bers, we can use the MOD func­tion because they are pre­cise. A num­ber in halfway will be returned by the MOD func­tion as still a halfway num­ber. In some oth­er sit­u­a­tions there can be some inac­cu­ra­cies, but they don’t con­cern us, because they will work cor­rect­ly. Here, we care only about halfway num­bers, which stay halfway in the MOD func­tion (Fig. 12)

The MOD function with whole numbers
Fig. 12 The MOD func­tion with whole numbers

In the case of pen­nies, we have to use a dif­fer­ent method. This method will show the num­ber of dig­its we want to have. Let’s assume that we want to have five dig­its after dot. In such a case, we have to change our num­ber to text by using the TEXT func­tion, where we write the for­mat num­ber as 0.00000 (Fig. 13)

=TEXT(H2,“0.00000”)

Changing numbers into text
Fig. 13 Chang­ing num­bers into text

Just like that we have num­bers as text, but with five-dig­it pre­ci­sion. Now, let’s look for halfway num­bers. We can see that halfway is 500 as the last three dig­its (Fig. 14)

Numbers with five-digit precision
Fig. 14 Num­bers with five-dig­it precision

Now, we have to take out those three dig­its. Since they are locat­ed on the right side, we can use the RIGHT func­tion, where we write 3 (Fig. 15)

=RIGHT(TEXT(H2,“0.00000”),3)

The RIGHT function taking out the last five digits
Fig. 15 The RIGHT func­tion tak­ing out the last five digits

And just like that we have only three, last dig­its. When we are in halfway, we will have exact­ly 500. Here, we also have to remem­ber about dif­fer­ent round­ings. If the num­ber before 500 is odd, we go up, but then it’s even, we go down (Fig. 16)

Three, last digits
Fig. 16 Three, last digits

We have to check whether the num­ber is equal to 500 using the IF func­tion. We have remem­ber that we are work­ing with text, so we need to write 500 in dou­ble quote. Then, we can sim­ply use the MROUND func­tion, just like in pre­vi­ous exam­ples, but this time our mul­ti­ply isn’t 2, but 0.02. If we aren’t halfway, we can sim­ply round our val­ues using the ROUND func­tion (Fig. 17)

=IF(RIGHT(TEXT(H2,“0.00000”),3)=“500”,MROUND(H2,0.02),ROUND(H2,2))

The IF function
Fig. 17 The IF function 

We can see that the round­ing went up when the sig­nif­i­cant num­ber was odd, and the round­ing went down when the sig­nif­i­cant num­ber was even. When we passed the halfway thresh­old, we start­ed round­ing up. We have a for­mu­la that works with dec­i­mal places and the banker’s round­ing, how­ev­er, we have to remem­ber about our assump­tions. We set the pre­ci­sion to five dig­its, but only the last three of them are impor­tant for us. Based on the last three dig­its, the round­ing uses the MROUND or the ROUND func­tion (Fig. 18)

Results
Fig. 18 Results

https://www.youtube.com/watch?v=kUOXZFXwPzw

Round Numbers to Dollars Pennies and Hundreds

Today, we will talk about round­ing in Excel.

Round Num­bers to Dol­lars Pen­nies and Hundreds

This task is quite easy as we have prop­er func­tions, how­ev­er we have to under­stand how the round­ing works in Excel. 

The most impor­tant thing is the most sig­nif­i­cant dig­it. When we round to whole num­bers, e.g. to a dol­lar, the most sig­nif­i­cant num­ber is the first dig­it after dot. If this num­ber is 4 or less, the round­ing goes down. How­ev­er, if the num­ber is 5 or more, the round­ing goes up. If we remem­ber this, we can start round­ing in Excel (Fig. 1)

The digit after dot
Fig. 1 The dig­it after dot

Now, we can use the ROUND func­tion, give it a num­ber and write the num­ber of dig­its we want to round up. Since we want to round to whole num­bers, we have to write 0 (Fig. 2)

=ROUND(A2,0)

ROUND function
Fig. 2 ROUND function

And just like that we have round­ed to whole dol­lars. We can see that in the case of 49 cents, we are going down, and in the case of 50 cents, we are going up. And from 5 to the end of the list, we are only going up, as we have passed the halfway thresh­old (Fig. 3)

Halfway threshold
Fig. 3 Halfway threshold

If we want to round to pen­nies, the sit­u­a­tion is almost the same. How­ev­er, in the case of round­ing to whole dol­lars, the most sig­nif­i­cant num­ber was the first one after dot, and in this case, the most sig­nif­i­cant dig­it is the third one. If the dig­it is 5 or greater, it will go up by a pen­ny. Let’s use the ROUND func­tion again, give it a num­ber, but now we have to write 2 in the place of the num­ber of dig­its. As we know, a pen­ny is one hun­dredth of a dol­lar, which means that it’s two dig­its after dot (Fig. 4)

=ROUND(D2,2)

Rounding to pennies
Fig. 4 Round­ing to pennies

And just like that, we have round­ed num­bers to pen­nies. We can see that when we passed the halfway thresh­old, we start­ed round­ing up (Fig. 5)

Results
Fig. 5 Results

In Excel, we can round even to big­ger mul­ti­pli­ca­tions of ten, e.g. one hun­dred. In this case, the sec­ond num­ber is the most sig­nif­i­cant one. We have to remem­ber that when round­ing to one hun­dred or any big­ger, whole num­bers, we have to write the num­ber of dig­its as neg­a­tive. Since we are round­ing to one hun­dred, we have to write ‑2, as there are two 0s, or two dig­its to the left from 1. When we go to the right from the dot, as it was in pre­vi­ous exam­ples, we have to write a pos­i­tive num­ber, and when we go to the left, we write a neg­a­tive num­ber (Fig. 6)

=ROUND(G2,-2)

Rounding to 100
Fig. 6 Round­ing to 100

As we can see, when we went halfway, i.e. 50, we round­ed up (Fig. 7)

Fig. 7 Results

https://www.youtube.com/watch?v=HepMvAic5Qk

The most frequent text

In the pre­vi­ous post, I was talk­ing about a dom­i­nant, which is the most fre­quent num­ber. Today, we are going to find the most fre­quent text.

Most fre­quent text 

This task is a bit hard­er, because the MODE func­tion that we used pre­vi­ous­ly needs num­bers. It means that we have to con­vert text into num­bers. To do so, we can use the MATCH func­tion. It means that we will be look­ing for our whole text in our whole text. We want the exact match (Fig. 1)

MATCH function to look for the exact match
Fig. MATCH func­tion to look for the exact match

While using the MATCH func­tion, Excel starts cal­cu­la­tions from the top. It means that each pup­py in the range is refer­ring to the first one on the list, which is on the first posi­tion is pre­sent­ed as 1 (Fig. 2)

uppy gets number 1
Fig. 2 Pup­py gets num­ber 1

Look­ing at the sec­ond exam­ple, the first kit­ten is in posi­tion num­ber 2, so each kit­ten will refer to the same num­ber (Fig. 3)

Kitten gets number 2
Fig. 3 Kit­ten gets num­ber 2

Now, that we have our text con­nect­ed to num­bers, we can add the MODE.MULT func­tion to return the most fre­quent num­bers, i.e. posi­tions of text (Fig. 4)

=MODE.MULT(MATCH(A2:A9,A2:A9,0))

 MODE.MULT function to return the most frequent numbers
Fig. 4 MODE.MULT func­tion to return the most fre­quent numbers

And we have the results (Fig. 5)

Results
Fig. 5 Results

Since we have the posi­tions, we can add the INDEX func­tion to return text con­nect­ed to those posi­tions (Fig. 6)

=INDEX(A2:A9,MODE.MULT(MATCH(A2:A9,A2:A9,0)))

INDEX function to return text
Fig. 6 INDEX func­tion to return text

Just like that we have our solu­tions in the Dynam­ic Array Excel (Fig. 7)

Solutions in Dynami Array
Fig. 7 Solu­tions in Dyna­mi Array

In the clas­sic Lega­cy Excel, we should select more cells and use the Ctrl + Shift + Enter key com­bi­na­tion to put our results in all cells (Fig. 8)

Key combination
Fig. 8 Key combination

How­ev­er, we are in DA Excel, so we have a sim­pler solu­tion. At the end, we want to check what hap­pens when the text appears only once in a range. We can see that the MODE.MULT func­tion returns the #N/A error (Fig. 9)

 #N/A error
Fig. 9 #N/A error

When text appears the same num­ber of times, in our case it’s cat and dog, the MODE.MULT func­tion will return those results (Fig. 10)

Results
Fig. 10 Results

https://www.youtube.com/watch?v=MpdrAz_ZNdo

The most frequent number

Today, we want to find the most fre­quent value/number.

Most fre­quent number

From sta­tis­ti­cal point of view, we want to find a dom­i­nant. This task is quite easy in Excel, how­ev­er there are some nuances. It’s easy thanks to the MODE func­tion. We can use it to find a sin­gle dom­i­nant. In this func­tion, we just select the range, and Excel will quick­ly cal­cu­late it for us (Fig. 1)

=MODE(A2:A9)

MODE function
Fig. 1 MODE function

We have to remem­ber that while using the MODE or MODE.SNGL func­tion, Excel will return only one num­ber. It means that we can­not be sure that only this num­ber is the most fre­quent one. There is a way out, as we also have the MODE.MULT func­tion (Fig. 2)

=MODE.MULT(A2:A9)

 MODE.MULT function
Fig. 2 MODE.MULT function

After using this func­tion, we can see that in our exam­ple there are two most fre­quent num­bers: 5 and ‑1. The MODE func­tion showed only the num­ber that appeared at the begin­ning of the range. When I change the order of the two first num­bers in the range, we can see that now the MODE.SNGL func­tion returns ‑1. The MODE.MULT func­tion will still return two num­ber, how­ev­er in dif­fer­ent order (Fig. 3). 

Different order of numbers
Fig. 3 Dif­fer­ent order of numbers

When we use the MODE.SNGL func­tion in a range where there isn’t any most fre­quent num­bers and each num­ber occurs only once, the func­tion will return the #N/A error. In our range of Wages, each wage appears only once (Fig. 4)

 #N/A error
Fig. 4 #N/A error

https://www.youtube.com/watch?v=XZs8lwM7Oqg

How to Insert a Scroll Bar 

Today, we are going to learn how to insert scroll bars in Excel and where we can use them.

How to Insert Scroll Bar 

In our first exam­ple, we have a PMT func­tion. The scroll bars help us change our val­ue for the PMT func­tion more rapid­ly (Fig. 1)

 PMT function
Fig. 1 PMT function

Let’s insert a scroll bar from the film Excel tips 43, when I was chang­ing the time with a scroll bar. Let’s start with the Devel­op­er tab. It’s turned off by default, so we have turn it on. Just right click on the rib­bon and choose the Cus­tomize the Rib­bon option (Fig. 2)

 Customize the Ribbon option
Fig. 2 Cus­tomize the Rib­bon option

In the win­dow that appeared we have to find the Devel­op­er tab, select the prop­er check­box and press OK (Fig.3)

 Developer checkbox
Fig. 3 Devel­op­er checkbox

Now, we can go to the Insert option and select the Scroll Bars in the Form Con­trols area. We aren’t inter­est­ed in ActiveX Con­trols because they are con­nect­ed with VBA, and we need some­thing sim­ple. Now, we can draw our scroll bar. When we are hold­ing the Alt key, Excel will fit our scroll bar to cell bor­ders. We don’t always want to do it, but we have such an option. Even after select­ing our scroll bar area, when we click the Alt key, Excel will still fit it to cell bor­ders (Fig. 5)

Cell borders
Fig. 5 Cell borders

In our case it isn’t so impor­tant. Now, we have our ver­ti­cal bar (Fig. 6)

Vertical bar
Fig. 6 Ver­ti­cal bar

And hor­i­zon­tal bars (Fig. 7)

Horizontal bars
Fig. 7 Hor­i­zon­tal bars

Let’s look at prop­er­ties of the scroll bar. We have to right click to select the scroll bar and right click again to go to the For­mat Con­trol option (Fig. 8).

Going to scroll bar properties
Fig. 8 Going to scroll bar properties

In the win­dow that appeared, we have some options, such as For­mat Con­trol which is now 26, Min­i­mum val­ue which is 0, Max­i­mum val­ue which is 100. We have to remem­ber that scroll bars can have only inte­ger num­bers from 0 to 30.000. In our exam­ple, I want to work with time and I want the scroll bar to have a 1‑minute pre­ci­sion. It means that I have to set the max­i­mum val­ue to 1440, as this is the num­ber of min­utes in one day. The next option, which is Incre­men­tal change, is con­nect­ed to the arrows at the ends of our scroll bars. Then, we have Page change which is con­nect­ed to click­ing on our scroll bar. How­ev­er, the most impor­tant option here is the Cell link bar. We can con­nect Cur­rent val­ue to Cell link. Let’s assume that I want to con­nect our scroll bar to cell E1. I’m click­ing on the cell and press­ing OK (Fig. 9)

Connecting Current value to a cell
Fig. 9 Con­nect­ing Cur­rent val­ue to a cell

Now, the val­ue in cell E1 changed into 26 because that’s the cur­rent val­ue in our scroll bar (Fig. 10)

The same value
Fig. 10 The same value

When I move the scroll bar, the val­ue in cell E1 is also chang­ing in accor­dance to the val­ue on the bar. When we click on the arrows on our scroll bar, the time is chang­ing minute by minute down­wards or upwards. When we click on the scroll bar, but not on the arrows, we move by 10 min­utes upwards or down­wards, depend­ing on which part we are click­ing. We can move even more rapid­ly by catch­ing the slid­er and mov­ing it.

Our val­ue from the scroll bar is an inte­ger. Some­time, though, we need time or per­cent­ages. The ques­tion is, how can we changed inte­gers into time or per­cent­ages? In our exam­ple, we have to just divide the val­ue by 1440 and we will get the time in min­utes (Fig. 11)

=E1/1440

Changing integers into time
Fig. Chang­ing inte­gers into time

https://www.youtube.com/watch?v=_LCqaHTnNHs