Here we are going to use the below-given dataset to insert the blank rows.

See the dataset image below:-

To insert a blank row after every next row of the dataset, we will use the following procedure.

First, we will insert a **temporary** ‘Helper Column’ before the very first column of the dataset.

After solving the problem, we will delete this temporary ‘Helper Column’ because of no use.

To inserting a ‘Helper Column’ before the very first column, we need to click on ‘Column A’.

‘Column A’ is selected now.

Press ‘Right-Click’ from the mouse on any part of the selected column to insert a new blank column.

Click on ‘Insert’, and see that one column is inserted before ‘Month’ (Column A).

Name this column as ‘Helper Column’.

Then start dragging numbers into this column from 1 to the last row of the dataset.

See the image below:-

Here we have our dataset till the 13th of the row, so we will drag it till the 13th row.

Then again start dragging numbers from the next row after the dataset in the same column.

This time we will drag at least one more number from the above-dragged number.

See the image below:-

The next step is to select all the datasets including ‘Helper Column’ till the last dragged numbers (13).

Now we will short this whole dataset in order to smallest to largest number format.

We have two different methods to sort the dataset.

**Method1:- Using the “Data” tab From the Ribbon**

**Method2:- Go to the “Home” tab Then “Editing” Group (extreme right in the ribbon) and find ‘Sort & Filter’ Then Use the ‘Custom Sort’ option**

Using both ways will get the same result.

Here we will use the first method by using the “Data” tab from the ribbon.

Click on the “Data” tab in the ribbon

See the image below:-

Putting the following values in the appropriate field

**Column Sort by: – Helper Column**

**Sort On: – Values**

**Order: – Smallest to Largest**

See the image below:-

Then press “OK”.

After pressing the ‘OK’ button see the result below:-

**See the blank rows are inserted after every row in the given dataset**

Now there is no need to keep the ‘Helper Column’ here.

To delete this by selecting this whole single column and use ‘Right-Click’ properties from the mouse and click on the “Delete’ option

See how the dataset looks after deleting the helper column.

See the image below:-

Once the ‘Helper Column’ is deleted, see that there is a blank row has been inserted after every row in the dataset.

Again insert a ‘Helper Column’ and drag the number from 1 to the last row of the dataset.

Then start dragging numbers from the next line, in the 2, 4, 6, format and drag it at least one more number from the above-dragged list.

See the image below:-

Select all the datasets, including ‘Helper Column’, and till the last row of the dragged number.

Then again Go to the “Data” tab and sort the data as we did in a previous way.

Once we did this, press ‘OK’.

See the image below:-

Again delete the temporary inserted ‘Helper Column’.

See what how our new dataset looks like.

A blank row has been inserted after every 2^{nd} row in the dataset.

In the same way, we can insert a blank row after every 3^{rd} row in the dataset and so on.

Now the same way, we can insert a blank row after every 3^{rd} or 4^{th,} or even nth row in the dataset.

If you want to learn more about this, please visit **Microsoft Office Support**.

I hope that you find this tutorial helpful.

Please free to put your comments or suggestion in the comment box below.

Thanks

Narendra

**Related Post**

5 Ways to Delete Blank Rows in Excel (With VBA Macro)

How to Change the Background Colors in Excel VBA

How to Wrap Text in Excel – 4 Easiest Method

]]>This function can find the value within a dataset with single or multiple criteria or conditions.

We have completed, Excel SUM and SUMIF Functions in our previous posts.

=SUMIFS (sum_range, criteria_range1, criteria1, [criteria_range2, criteria2….])

Sum_range = (required) this is the range where our result falls.

_range1= (required) this the first range of the criteria or condition

Criteria1 = (required) this is our criteria or condition

_range2 = [optional] this the range of our second criteria

Criteria2 = [optional] this is our second criteria

As a result, this function returns a numeric value.

We can make a pair of criteria_range and criteria arguments up to 127 within this function.

Text criteria as a string (“east”) or an expression (>, <, <>, =), must be entered within the quotes.

Numeric criteria do not require double-quotes.

This function also supports logical operators (>, <, <>, =) and wildcard characters (*, ?) for partial match.

Wildcard characters can be used as criteria where (?) question mark matches the single. An asterisk (*) matches any sequence of characters.

Use the tilde (~) before a question mark or asterisk to find a question mark or asterisk. (i.e. ~?, ~*).

In the Excel SUMIFS function, sum_range is the first argument and the third argument in the SUMIF function.

This function behaves “APPLE” and “apple” as equal, so not case-sensitive.

Rows and Columns must be equal in the criteria_range and the sum_range.

We can change the position of criteria, but make sure its ranges must be changed respectively.

Here, in this post, we will use the following dataset as an example

See the image:-

With the help of the above dataset, we will use multiple examples to learn this function deeply.

**Situation-01**

**How to find the total sales value of “Banana’s” where the zone is “North”?**

In our previous post, **Excel SUMIF Function**, we use only single criteria. But in this post, we are going to use multiples.

**Solution:**

Our question is, how to find the total sales value where the fruit is “Banana” and its zone is “North”.

First, find out the range where our all (sum_range) or sales values are appearing, it is range “F2: F11”. Our first parameter is final.

As per our question, the first criteria is, “North” and is appearing under the “Zone” column. So criteria1 is “North”, and criteria_range1 is “B2: B11.

Our second criteria “Banana” and is appearing under the “Fruits” column. So our criteria2 is “Banana”, and criteria_range2 is “C2: C11”.

See the below image where all the criteria are appearing.

We have found all the criteria and their ranges in the above dataset

Now, put all these parameters within the Excel SUMIFS Function.

=SUMIFS (sum_range, criteria_range1, criteria1, criteria_range2, criteria2)

=SUMIFS (F2:F11,B2:B11,”North”,C2:C11,”Banana”) and now press enter.

Our result is =500

So, the total sales value of “Banana” under the “North” zone is 500.

**Situation-02**

**How to find the sales value of the fruits, sold under the “South” zone and where the date range is “>=12/25/2014”?**

**Solution:**

As we did in our previous example, find out the criteria and criteria_ranges first.

Our criteria1 is “South” under the Zone column, so our criteria_range1 will be “B2: B11”, where our criteria exist.

Our criteria2 is date range “>=12/25/2014”, so our criteria_range2 will be “A2: A11” because our criteria exist here.

See image below:-

Now put these parameters within the Excel SUMIFS Function as we applied in the above image example

Our function is :- SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2,criteria2).

Now put all values within the Excel SUMIFS Function. See below:-

=SUMIFS (F17:F26, A17:A26,”>=12/25/14″,B17:B26,”South”) and press enter.

Our result is = 782.

So, the total sales value of fruits sold under the “South” zone where the date range “>=12/25/2014” is 782.

**Situation-03**

**How to find the total sales value of “Banana” where the date range is “>=12/25/2014” to “<=02/15/2016”**.

**Solution:**

In this example, we will find out the sales value of a fruit “Banana”, which falls between two date ranges.

First of all, we need to find out our criteria and criteria_ranges.

According to the above question, our criteria are “Banana” and “date ranges”.

So, our criteria’s and its range are as follows:-

Sum_range: F33: F42 (where our sales value exist)

_range1: C33: C42 (where criteria1 falls), Criteria1: “Banana”

_range2: A33: A42 (where first date range falls), Criteria 2: “>=12/25/2014”

_range3: A33: A42 (where second date range fall), Criteria3: “<=02/15/2016”

See the image below:-

Criteria_range2 and _range3 are the same, but their criteria are different because both fall in the same range.

Now, we will apply these values within the below-given function.

Sum_range = F32:F42

_range1 = C33: C42, Criteria1 = “Banana”

_range2 = A33:A42, Criteria2 = “>=12/25/14”

_range3 = A33:A42, Criteria3 = “<=02/15/16”

Now put these values within the function with their respective places.

=SUMIFS (F33:F42, C33:C42,”Banana”, A33:A42,”>=12/25/14″, A33:A42,”<=02/15/16″) and press enter

And our answer = 1282.

So, the total sales value of “Banana”, sold between the date range “>=12/25/2014” to “<=02/15/2016” is 1282.

So here, you can see that we have applied multiple criteria to find the total sum value of the product.

If you want to learn more about this function, please visit Microsoft Office Support.

I hope you find this post useful, please feel free to put your comments and suggestion in the comment box below.

Thanks

Narendra

**Related Post**

Excel SUM Function – How to Use

How to use Excel SUMIF Function

]]>SUM function sums the values in a range where the IF function supply the criteria or condition for the same. More we will learn in this tutorial further.

SUMIF is a useful function that helps to sum the values in a range with a single condition or criteria.

The arguments of the function are as follows:-

=SUMIF (range, criteria, [sum_range]

**range** – (required) this is the range of cells where we will put the criteria.

**criteria** – (required) this criteria or condition will determine the condition of the sum.

**[sum_range]** [optional] – this is the actual range to sum, if omitted, it will use the first range as sum_range.

It will return a result as the sum of all number values met with the specified criteria.

If the criteria are text or math symbols (>, <,*, /) it must be in double quotation marks (“).

Numeric criteria entered without quotation marks.

If sum_range omitted, first parameters “range” will be summed.

Wildcard character (?) and (*) can be used in criteria. Question (?) mark matches only one character where an asterisk (*) matches a sequence or number of characters.

To find question mark or asterisk, use the tilde (~) in from question mark or asterisk (i.e. ~? and ~*).

Criteria can be a number, expression, cell reference, text, or formula.

Blank cells or text values in sum_range are ignored.

Criteria should be not more than 255 characters.

We will use below-given data-set to understand Excel SUMIF Function. First we learn that if the third argument ‘sum_range’ is omit in any cases then how to apply this function.

**Question 1:**

Make a sum for the values are stored “In-Stock” column and must be greater than (>20) only.

**Solution:**

In the above mentioned data-set, find out column “In Stock” and its range. Now apply Excel SUMIF Function within that range.

Know our ‘range’ and ‘criteria’ first.

So, here “In-Stock” column our range is “D2:D11”.

And our criteria is “>20”.

Now, put these parameters “range” and “criteria” in the Excel SUMIF Function. Where sum_range is omit.

=SUMIF(range, criteria,[sum_range]

See below image:-

Our formula looks like:-

=SUMIF (D2:D11,”>20”) and hit enter.

Our result is 193.

Sum of values which are “>20” is 193 in the “In-Stock” column.

Furthermore, we will learn that if we have a third parameter sum_range also.

When all the parameters are given, such as: – range, criteria, sum_range.

**Question-2**

How to find the total values of “Oranges” in the below-given dataset?

**Solution:**

First of all, within the given dataset we need to know our parameters within the question, focus on two things first:-

**Total value**– our total values for all the products are stored in column “Value”, range (E2:E11).**Oranges**– this is our ‘criteria’ parameter and located in column “Fruit Name”, the range is “B2:B11”.

In this example, our parameters belong to two different ranges, so here our third argument will exist also.

See below image and identify our parameters and criteria.

Here, in this image we can identify that our values and criteria are in two different columns or ranges.

So here total values will be our sum_range, “Orange” is our criteria and range of criteria will be our criteria_range “B2:B11”.

Now put these parameters within the Excel SUMIF Function and find our desired result.

Our function is: – =SUMIF (Criteria_range, criteria, sum_range)

Where

Criteria_Range = B2:B11

Criteria = “Orange” and

Sum_range = E2:E11 (total value)

Put these parameters within the below given Excel SUMIF Function. See image below:-

=SUMIF (B2:B11,”Orange”, E2:E11) and hit enter

Our result is = 4200.

Now move to the next condition.

**Question 3**

Find out the total values of all the product where the date range is “>12/25/2014”.

**Solution:**

First, try to understand situation, it is asking for the total values of all the products. But the condition is, the date must be is greater than “>12/25/2014”.

In Excel SUMIF Function, criteria and criteria_range both belong to the same range and in the same column. Here our criteria are “>12/25/2014”, so criteria_range is the whole range where our criteria exist. i.e. “A2:A11”.

We have identified two parameters:- criteria_range and criteria.

Third parameter Sum_range is, where the values of all the products is existing. i.e. “E2:E11”.

So our third parameter, sum_range is “E2:E11”.

Now put these parameters in one place within the Excel SUMIF function, see below:-

Criteria_range =”A2:A11”

Criteria =>12/25/2014

Sum_range = E2:E11 (total values)

Apply these three parameters within the Excel SUMIF Function.

=SUMIF (criteria_range, criteria, sum_range)

=SUMIF (A2:A11, “>12/25/2014”, E2:E11) and press enter.

And our result is 12517.

Furthermore, details of the Excel SUMIF Function are provided on the Microsoft Office website.

I hope you find this tutorial useful, please feel free to put your comments and suggestion.

Thanks.

Related Post

Excel SUM Function – How to Use (With Example)

Excel COUNT Function – How to Use (with example)

How to Use Excel COUNTIF Function – with Multiple Condition

Excel COUNTBLANK Function – An Introduction Guide

]]>Here we will learn “5” easiest methods to get rid of blank Rows in Excel.

First of all, we must share the dataset image of our dataset in which we are going to work. See the image below.

This dataset is containing some partial blank rows and some complete blank.

Partial blank rows are necessary because containing some data, so no need to remove these rows.

But complete blank rows have no meaning in the dataset, so need to delete these rows.

Here in this tutorial, with the help of some useful Excel Function, we will remove these complete blank rows.

In a small dataset, we can delete these blank rows easily one by one but it is not possible in a huge dataset.

So here, we have many ways describe to delete unwanted completely blank rows.

So the first method, we use the Excel COUNTBLANK Function which helps to count the blank cells in a row.

We need to convert this dataset into a table. And then we will insert a new column after the last column of the dataset.

So in the last inserted rows, we will apply the **Excel COUNTBLANK Function** to count blank cells in the whole rows.

The maximum occurrence of blank cells, will be considered as the complete blank rows.

Then we can apply the filter option to select all these blank rows and delete them.

For converting the dataset in a table format, select the whole dataset and press the keyboard shortcut command “Ctrl + T”. Using this command will convert our dataset into a table format.

Converting the Excel data into a table is much easier for calculating the data and updating the data at once.

See the image below:-

Using this command, a small “Create Table” pop-up opens. Just press “Ok” here.

See our dataset has been converted into a table format, See the image below:-

Now at the end of the new dataset, we will insert a new column and name it “Blank”. See the image below:-

Now apply the Excel COUNTBLANK formula in the last added column “Blank” and press Enter:-

We will get the following image, where we can see that the red circled area represents the maximum of 5 nos. of cells are blank. i.e. these whole rows are blank and need to be deleted.

Here we need to apply the filter for maximum occurrence of blank cells which are red circled in the above image.

Go to filter in editing tab and click “Sort & Filter” drop-down and click on “Filter” and we will get the below image.

Now click on the drop-down of the Blank column and remove the tick from the “Select All” and then tick on the maximum figure. In this case, “5” is the maximum figure and press “OK”. Once we press “OK” we will get the below image.

Select all blank rows and go to “Home Tab” in the ribbon and then go to “Cells Group” and click on the “Delete” drop-down menu and click on “Delete Sheet Rows”.

See the image below:-

After deleting the blank rows from our dataset, our new dataset will looks as below image:-

Our new dataset is free from the unwanted blank rows.

Some cells are appearing blank but they are partial blank not completely. Which means they have some data.

This is our second method to delete unwanted blank rows from the dataset.

As we did in the previous method, convert our dataset in a table format and then apply the ‘Excel COUNTA Function’.

Excel COUNTA function counts every character as “1”, and if there is no data in any cell, it will consider as “0”.

As we know the Excel COUNTA Function, counts every single character in the cells.

See in the image below:-

If the total count is “0” at the blank column, which means this row is completely blank.

Now apply the filter here, and this time we are looking for “0” here. In this method total count “0” is the complete blank rows.

And select the blank rows and delete them in the same way.

The Excel ISBLANK function works the same as the Excel COUNTA function. When we apply the ISBLANK function to find the blank rows in the Excel data set, keep in mind that here we press **Ctrl+Shift+Enter** instead of simple Enter as an array formula.

Use this formula in the following way.

This function tells us, if there is any blank cell it will give the result as “TRUE” and if not blank then “FALSE”.

Here we will filter for “TRUE” in the blank column and then again select it and delete these unwanted blank rows.

Using the SUM with LEN (length) function, this function will calculate total characters in the row and sum up. But if there are no characters in any cell it will represents as “0”.

Remember that this an array formula and need to press “**Ctrl+Shift+Enter**” instead of simply Enter.

After applying the formula, apply filter and select “0” from the drop-down and select all rows having “0” value in the blank column. And delete blank rows and our dataset is now free from unwanted blank rows.

To find blank rows in the dataset, here we will use Excel FIND Function.

For that first, we will select all the datasets.

Then press “Ctrl + F” to open the Find and Replace dialogue box as and click on the “Option” button and leave “Find what” as blank, change “Look in” as “Values” and click on Find All.

Once we click on Find All button we will get the following image:-

When we will hit “Find All”, we will get some data area in the above-mentioned format. Put the cursor on the above mentioned area and press “Ctrl + A”.

After pressing “Ctrl + A”, all the blank cells will be highlighted and once all blank cells will be highlighted, close the “Find and Replace” box.

Apply filters and select the blank rows and apply the earlier procedure to delete blank rows.

Here we will use the “Go to Special” method to delete the unwanted blank rows in the Excel dataset.

First, select all the datasets and press “F5” as a keyboard shortcut.

You can also use the “Menu” bar here to locate the “Go to Special” option.

Go to the “Home” tab then go to the “Editing” group and click “Find & Select” from the drop-down menu and click the “Go to Special” option.

See Image below:-

Once click on the “Go to Special” option, the following image will appear

Click on the “Blanks” radio button and press the “OK” button. Our blank rows will be selected in our dataset.

See the image below:-

To delete the blank rows go to the “Home” tab and then go to the “Cells” group and click on the “Delete” option and finally click “Delete Sheet Rows” and all the selected blank rows will be deleted.

Here we will use the “Filter” method to delete the blank rows in Excel. This is one of the easiest methods.

First, we will select all the Excel dataset as we did in earlier methods.

Then go to the “Home” tab and then go to “Editing” group then use “Short & Filter” click on drop-down here and select “Filter” option. See the image below:-

Once we click on “Filter”, see the following will appears.

Select any filter drop-down menu and remove checked from “Select All”. Mark checked on the “Blanks” check box at the end and press “OK”.

All the blank rows only will be displayed highlighted and then apply the deleting procedure as we did in the rest of the methods.

There is another method to “Delete Blank Rows” in Excel with the help of the VBA macro.

In this method, go to the “Developer” tab, then click on left most “Visual Basic” option, a new VBA Application window will open.

Go to the “Insert” tab and insert a new “Module” by clicking on “Module”.

Write the following VBA code in this module, see how it looks like:-

Sub Delete_blank_rows() Range(“A1:E20”).Select Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Select Selection.Delete End Sub |

Now execute this VBA code step by step by pressing “F8” again and again.

All the blank rows will be selected and then deleted.

If the “Developer” tab is not enabled in your Excel window then just right-click anywhere in Excel “Ribbon” and click on “Customize the Ribbon”.

Once you click on “Customize the Ribbon”, the following window will open.

Then select option “Customize Ribbon” and at the very right side list options, make sure your “Developer” option is mark checked. Then click on “OK”.

Once you click on the “OK” button, your “Developer” tab will appear at the last in your “Menu” bar.

By clicking on the “Developer” tab you can apply the VBA method to delete blank rows in your dataset.

I hope this tutorial helps you learned about deleting the blank rows in the Excel dataset.

If you have any other way to delete blank rows, please feel free to share with others.

Thanks

Narendra

Related Post

How to Wrap Text in Excel – 4 Easiest Method

How to Create a Custom AutoFill List in Excel 2013

]]>In this blog post, you will learn about changing the background colors in Excel VBA.

In Excel, we change the background color by selecting the range, then go to the ‘Home’ tab then go to the ‘Font’ group and select the ‘Fill Color’ option.

Click the drop-down link and there are multiple colors, which you can apply into your selected range where you want to change the background color.

Here, you will learn about how to change the background colors with the help of VBA.

In VBA, you will learn to change the background color with three (3) easiest methods.

In this method, you can use 8 standard colors in the VBA. These color are as follows:-

Black – vbBlack White – vbWhite Red -vbRed Blue – vbBlue Green – vbGreen Yellow – vbYellow Cyan – vbCyan Magenta – vbMagenta |

These are 8 standard colors, which we can apply with their names in VBA.

Change the Background Colors in Excel VBA, we need to use the above standard colors in VBA Code.

Now, we will apply these codes in one of our VBA macros to change the colors of background colors in Excel VBA within cells from range “A1” to “A10”.

Sub Standard_Color() Range(“A1:A10”).Interior.Color = vbBlack Range(“A1:A10”).Interior.Color = vbWhite Range(“A1:A10”).Interior.Color = vbRed Range(“A1:A10”).Interior.Color = vbBlue Range(“A1:A10”).Interior.Color = vbGreen Range(“A1:A10”).Interior.Color = vbYellow Range(“A1:A10”).Interior.Color = vbCyan Range(“A1:A10”).Interior.Color = vbMagenta End Sub |

By executing the above VBA code by pressing “F8” step by step, our result will be shown as the below image:-

If you execute the above code by pressing “F8”, you will notice each execution will change the background colors.

Below is the another method to “Change the Background Colors in Excel VBA”.

In this method, there are 56 colors that we can apply to ‘change our background colors in Excel VBA,.

Each number from 1 to 56 has a particular color code.

When we will apply this method to change the background color, we will change the code ‘ColorIndex’ in place of ‘Color’.

Now we will apply for these numbers in the VBA editor window to change the background colors.

See the code in the VBA editor window:-

Sub ColorIndex_Method() Range(“A1:A10”).Interior.ColorIndex = 1 Range(“A1:A10”).Interior.ColorIndex = 2 Range(“A1:A10”).Interior.ColorIndex = 5 Range(“A1:A10”).Interior.ColorIndex = 15 Range(“A1:A10”).Interior.ColorIndex = 25 Range(“A1:A10”).Interior.ColorIndex = 45 Range(“A1:A10”).Interior.ColorIndex = 55 Range(“A1:A10”).Interior.ColorIndex = 56 End Sub |

Now we will execute the above code by pressing “F8” again and again to execute each of the codes.

See below image for result:-

Here we have only applied some code to change the background colors in Excel VBA.

But, in this method, we can use the number from 1 to 56 to apply different colors.

RGB is a short form of Red, Green, and Blue.

These are the basic or primary colors and by combining these colors we can create multiple other new colors.

This is our 3rd method to ‘change the background colors in Excel VBA.

When applying these colors in VBA can be written as RGB (255,255,255).

Values in the bracket are the color code of each color, where the range of each color from 0 to 255. Where “0” is the minimum and “255” is the maximum range.

We can create multiples of colors with the help of these three (3) color codes.

Between ranges we can put any number for any color combination.

See the VBA code in the VBA Editor window:-

Sub Background_RGB_Method() Range(“A1:A10”).Interior.Color = RGB(0, 0, 0) ‘for Black Color Range(“A1:A10”).Interior.Color = RGB(0, 0, 255) ‘for Blue Color Range(“A1:A10”).Interior.Color = RGB(0, 255, 0) ‘ For green Color Range(“A1:A10”).Interior.Color = RGB(0, 255, 255) ‘For Cyan Color Range(“A1:A10”).Interior.Color = RGB(255, 0, 0) ‘For Red Color Range(“A1:A10”).Interior.Color = RGB(255, 0, 255) ‘For Magenta Color Range(“A1:A10”).Interior.Color = RGB(255, 255, 0) ‘For Yellow Color End Sub |

Now pressing “F8” to execute the above code step by step, we will get the following result.

See the image below:-

Here, you can see that how we change the background colors in Excel VBA by the RGB method.

Here, in this post, we have explained the 3 easiest methods to change the background colors in Excel VBA.

Furthermore, details for the **Excel Interior Color (Background Color)** are provided on the Microsoft Office website.

I hope you find this post useful.

Please feel free to put your comments or suggestion.

Thanks

Related Post

]]>Suppose that we are entering our data into a cell and this data cross more than one cell.

See the image below:-

Here you can see that the text is crossing more than one cell.

According to Excel, the row height of Excel is ‘15’ by default, and column width is ‘8.43’.

So this size of the cell cannot adjust the above text in a single cell.

Second thing is that:-

When we enter the text in a cell once, our text is appearing till the end.

But when we enter the value in cell 2, our text value of the first cell is not visible fully.

See the image below:-

In this situation, we can use the Wrap Text feature in Excel and adjust our cell value into one cell.

In this blog post, you will learn some basic methods to Wrap Text within a cell.

In this method, we will wrap our text by Ribbon in Excel.

Here we have entered our text value in a cell, and this text value is crossing multiple cells.

Now we want to adjust the whole text value in a single cell by Wrap Text feature.

First of all, click on the cell, where our text value is appearing, i.e. cell A1.

Now go to the “Home” tab, and then the “Alignment” group, there are few options.

See image below:-

Click on Wrap Text and it is done.

See that our text value in cell A1 has been adjusted in a single cell.

See the image below for result:-

Now you can increase or decrease the column width or row height as per your need..

First of all, activate the cell or click on the cell which text to be a wrap.

Then go to the ‘Home’ tab and then ‘Alignment’ group and here you can see an ‘icon’ at the bottom right side of the box.

Click on that icon, and see the image below:-

**Or use the keyboard shortcut ‘Ctrl+1’ (Control + 1) to open the ‘Format Cells’ dialog box.**

Once you click on it and below format dialog box will appear.

In this format cell box, go to the ‘Alignment’ tab and click on the ‘Check box’ of ‘Wrap text’ option below the ‘Text control’ and press OK button.

See that your text has been successfully wrapped or adjusted in a cell.

Here, we will use the keyboard shortcut to apply Wrap text in Excel.

First, we need to make our text cell activate, in which we want to apply ‘Wrap text’.

Then use the below keyboard shortcuts from the keyboard.

**Alt + H +W**

As soon as you apply this command, your text value has been adjusted in a single cell.

This option allows us to adjust our text data into one cell by manually creating a line break within the text.

First of all, go to the cell where we want to apply the manual line break.

Then press ‘F2’ from the keyboard, by doing this, our text will be changed to edit mode.

See the image below:-

First, we need to decide that where we want to add a line break so that our text value is wrapped in the center of the cell.

Then press ‘Alt + Enter’ from the keyboard.

And it is done now.

Our text value is adjusted in a single cell.

We have learned several methods to apply ‘Wrap Text in Excel’.

Now it is time to know that how to remove ‘Wrap text’ in Excel

Click on the cell, from where you want to remove then click on the ‘Wrap text’ option in the ‘Alignment group’.

Mostly use the same method as we use to apply the ‘Wrap text’.

Such as shortcut key command, or using Format Cells option.

Furthermore, details for the **Wrap Text in Excel** are provided on the Microsoft Office website.

Please feel free to put your comments or suggestion in the comment box below.

Regards

Narendra

**Related Post**

Copy and paste are some of the most frequently used activity in Excel.

For copying the data in Excel, select the dataset, which you want to copy and use the keyboard shortcut (CTRL+C), and then go to the destination location, where we want to paste it use the keyboard shortcut (CTRL+V). Our copy and paste activity is complete.

Here in this tutorial, we will learn about the four easiest methods to copy and paste the data in excel VBA.

In this tutorial, we will learn each method one by one and step by step.

First of all, we will set a small data-set, which we will use for this tutorial to copy and paste. And then set our destination area later, different on every new method.

So, we will use the below-given data-set in all four methods.

In this image, we have one source range and four destination area. We will copy the source range and paste it to each destination area with four different methods.

In this method, our task is to copy data from Range (“A1 to A4”) to Range (“C1 to C4”).

First of all, go to the Developer tab and click Visual Basic and insert a new module.

Write code as follows:-

Sub Copy_and_Paste_01() ‘Range.Copy Method ‘first, write the range to be copied and press one space ‘then write destination field, where to paste data Range(“A1:A4”).Copy Destination:=Range(“C1”) End Sub |

Note: – if any line contains (‘) character before it, this is not a coding part and will not affect your coding. The coder explains, why this code is being written.

Just type your code (Range (“A1: A4”).copy) and press a single space, write the destination area where you want to paste it.

After writing the destination range, press F8 from the keyboard to execute the code.

And see the result of the coding in the image.

In this method, we will write the code differently, write the destination field first, and our source data second.

This is the field where we want to paste our data. In the previous example, we pasted our data in range (“C1: C4”), so here our destination area is (“C1: C4”).

Our source data, which we want to copy into another place.

**Common Mistake**

Many people do mistakes by writing our source range as the destination field. In this situation, we do not get the correct result.

Suppose that we have data in Range (“A1: A4”) and we want to copy this data into another location Range (“D1: D4”).

Here we need to know our destination field first, which is Range (“D1:D4”).

Our source data will remain the same, Range (“A1: A4”).

Write the macro as mentioned in the below box:-

Sub Copy_and_Paste_02() ‘Destination = Source Method ‘Destination – range where to paste data ‘Source data – our base data to be copied Range(“D1:D4”) = Range(“A1:A4”).Value End Sub |

Run the macro by pressing the F8 key from the keyboard, see in the below image.

This image is explaining the above method.

Paste Special method contains many options to paste the data-set. One data-set may contain many formatting.

Copy command copies all the formats in a single-use and Paste Special method can paste every format separately.

In future blogs, we will learn deeply about the Paste Special feature of Excel.

Here we will copy Range (“A1: A10”) and paste it into range (“H1: H10”).

See the macro in the box below:-

Sub Copy_and_Paste_03() ‘Paste Special Method ‘Copy the source data Range(“A1:A4”).Copy ‘here our data will be pasted Range(“E1”).PasteSpecial ‘below code will remove cut_copy_mode from the selected area Application.CutCopyMode = False End Sub |

See the result in the image below:-

The current Region is a VBA property to select all the datasets without giving any range. This property will not consider any data range beyond or after any complete blank rows or columns.

As we did in the previous method, we select our data-set by giving a complete range.

In this method, we only need to select the first cell of the data-set and then use the Current Region property to select the rest of the data.

Check this in the below box:-

Sub Copy_and_Paste_04() ‘CurrentRegion Method ‘We select the only range(“A1”)in the whole data ‘CurrentRegion will select the rest of it Range(“A1”).CurrentRegion.Copy Destination:=Range(“F1”) End Sub |

After executing the code by pressing (F8), see the result in the below image:-

These four methods are the best and easiest ways to copy and paste data in Excel VBA.

Furthermore, details for the **Copy and Paste in Excel VBA** are provided on the Microsoft Office website.

I hope you find this tutorial useful.

Please feel free to post your comment or suggestion below.

Thanks

**Another Useful Post**

5 Ways to Delete Blank Rows in Excel (With VBA Macro)

How to Change the Background Colors in Excel VBA

]]>Test Your Shortcut Skills

Test your short cut skills on Excel.

Which includes numbers, cell references, ranges, arrays, and always skip text values or blank cells.

=SUM (number1, [number2]… Number_n])

or

=SUM (Range1, [Range2], [Range3], …. [Range_n])

**Number – **A Numeric value that you want to sum

or

**Range** – ranges of cells that you want to sum.

Excel SUM Function always returns a numeric value.

With the help of the above-given parameters, you will learn, How to use Excel SUM Function with the help of the below-given dataset example.

In this method, we will add each number manually (+) within the SUM bracket and press Enter for the result.

In the second example, I have applied commas (,) after each number and press enter at last.

This function gives us the result by pressing simply Enter.

But we can use these methods in limited data which are very small datasets.

Because we cannot add a huge number of cell values manually.

So we cannot use these methods to make the sum of a large dataset.

Suppose that we have multiple ranges to sum, as you can see in the below-given image example.

Here we have 3 ranges as Range1, Range2, and Range3.

If we use the previous method to add these ranges manually, of course, the result would be the same but it would be a time taking method.

Now, we will use another method which is summing the ranges.

In this method you can sum the whole range with three methods:

**Dragging each range, separate by commas(,)****Dragging the whole dataset in a single range****Putting plus sign (+) between the ranges (Array case)**

All methods give the same result.

In this method, we will drag each range separately and put commas (,) after each range complete and after dragging all the ranges, press enters for the result.

Here, we will drag all whole range from start to end in one go, as you can see the image above, from range “A3: C10”, and press enter for the result.

Suppose that if you want to put plus (+) instead of commas (,), then all the ranges will be converted into Array form.

So if this is the situation, press (Ctrl+Shift+Enter) for getting the result.

See below (in array case):-

=SUM (A3:A10+B3:B10+C3:C10) and press “Ctrl+Shift+Enter”.

Pressing simple enter will not give you the correct answer.

This is the easiest method to make a sum of cells or range in a single click.

For AutoSum, go to the “Home” tab and then at the very right “Editing group”, See image below:-

How does this tool work?

So first of all, we will select the range for which we want to make a sum and then press the “AutoSum” button.

This tool will return the sum of the cell values or range in the next cell from the last cell of the dataset.

If we select a single range, this tool returns sum only for the single range.

But when we select multiple ranges in the dataset, as you can see in the image below, this tool returns the sum of all ranges separately next to the last cell of the dataset.

This tool cannot make the sum of multiple ranges in a single place.

This is one of the easiest methods to find the sum of all the selected cell values or ranges.

Here, as you select the dataset, the status bar quickly shows the sum of the dataset in the status bar.

In this method, you can select more than one cell, a range, or multiple ranges for quickly finding its sum, average, or count.

See in the below image:-

Furthermore, details for the **Excel SUM Function** are provided on the Microsoft Office website.

I hope you find this tutorial helpful.

Please feel free to put your comments in the below-given box.

Regards

**Another Useful Post**

How to Use Excel COUNTIF Function

How to Use Excel COUNTIFS Function with Multiple Criteria

]]>Excel COUNTIFS function is a member of the COUNT family and advance version of Excel COUNTIF Function.

This function is a combination of two functions, “COUNT” and “IFS” two functions. Separately both of them cannot do much but together can do wonders.

This function returns a number value as a result.

=COUNTIFS (criteria_range1, criteria1, [criteria_range2, criteria2]…….[criteria_range_n, criteria_n]

criteria_range1–[Required] This is the first range where to evaluate the associated criteria.

criteria1–[Required] The criteria will use on range 1.

criteria_range2 – [Optional] This is the second range were to evaluate the associated criteria.

criteria2 – [Optional] the criteria will use on range 2

We can apply up to 127 range/criteria pairs in a formula.

Excel COUNTIFS Function use the criteria such as DATES, numbers, text, and other condition.

The non-numeric or text criteria must be in double-quotes.

This function supports logical operators (><, <, <>, =) and wildcards (*,?) for partial matching

If the criteria argument is a reference to an empty cell, the COUNTIFS function treats the empty cell as a 0 value.

Every additional range must have the same number of rows and columns as the criteria_range1 argument. If the ranges mismatch then we will get a #value error.

Use wildcard characters (~ – tilde) as (~?) or (~*) when to find real question mark or asterisk.

Here is an image, where we have a dataset and on the right side of this image we have some condition that needs to be applied to find the result.

Excel COUNTIFS Function

How to find the number of persons those who are meeting with all the following criteria or condition in the above data-set.

Sex = “Male”

Salary = “>32000”

Department = “Sales”

Now find the solution for the above situation by applying Excel COUNTIFS Function step by step.

Look for the ranges where all of our criteria fall within. Such as:-

“Male” criteria fall under the “Sex” tab.

“>32000” criteria falls under “Salary” tab.

“Sales” criteria fall under the “Department” tab

Find the range of our each of the condition or criteria in the given data-set. See below:-

Our first criteria “Male” = falls within SEX tab, range: (B2: B11)

Second criteria “>32000” = falls within SALARY tab, range: (C2: C11)

Third criteria “Sales” = falls within DEPARTMENT tab, range: (D2: D11)

Now know the criteria and is its range. See below:-

Criteria_range1 = Sex (B2:B11)

Criteria1 = Male

Criteria_range2 = Salary (C2:C11)

Criteria2 =>32000

Criteria_range3 = Department (D2:D11)

Criteria3 = Sales

Put all these criteria within the Excel COUNTIFS Function.

=COUNTIFS (B2: B11, “Male”, C2: C11, “>32000”, D2: D11,” Sales”) and hit enter.

See the image below:-

Excel COUNTIFS Function

In cell G2 we have applied the Excel COUNTIFS Function and see the result.

We can also use the name in place of ranges, such as range (B2: B11) =Sex), range (C2: C11) =Salary, and range (D2: D11) =Sales.

So after giving the name for the ranges, our formula looks like as follows:-

=COUNTIFS (Sex, “Male”, Salary,“>32000”, Department, “Sales”)

Giving a name to a range is called name_range in Excel. In the future blog post, we will learn about name_range in Excel.

I hope you find this post about ‘Excel COUNTIFS Function’ useful.

Furthermore, details for the **Excel COUNTIFS Function** are provided on the Microsoft Office website.

Please feel free to put your comments or suggestion in the comment box below and if you like this post then do not hesitate to share it.

Thanks

Another Useful Post

]]>