You are reading the article Fill Down Blank Cells Until The Next Value In Excel (3 Easy Ways) updated in December 2023 on the website Tai-facebook.edu.vn. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 Fill Down Blank Cells Until The Next Value In Excel (3 Easy Ways)
Watch Video – Fill Down in Excel
A lot of times, you may encounter a data set where only one cell is filled with data and the cells below it are blank till the next value.
Something as shown below:
While this format works for some people, the problem with this sort of data is that you cannot use it to create Pivot Tables or use it in calculations.
And this has an easy fix!
In this tutorial, I will show you how to quickly fill down cells in Excel until the next filled value.
You can easily do this using a simple Go-To special dialog box technique, VBA, or Power Query.
So let’s get started!
Suppose you have a data set as shown below and you want to fill down data in column A and column B.
In column B, the aim is to fill ‘Printer’ till the last empty cell below it, and then when ‘Scanner’ starts, then fill ‘Scanner’ in the cells below till the cells are empty.
Below the steps to use go to special to select all the blank cells and fill down using a simple formula:
Select the data in which you want to fill down (A1:D21 in our example)
Go to the ‘Home’ tab
The above steps would select all the blank cells in the data set (as shown below).
In the blank cells that are selected, you would notice that one cell is lighter than the rest of the selection. This cell is the active cell where we’re going to enter a formula.
Don’t worry about where the cell is in the selection, as our method would work in any case.
Now, below are the steps to fill down the data in the selected blank cells:
Hit the equal-to (=) key on your keyboard. This will insert an equal to sign in the active cell
Press the up arrow key. This will insert the cell reference of the cell above the active cell. For example, in our case, B3 is the active cell and when we do these two steps, it enters =B2 in the cell
Hold the Control key, and press the Enter key
The above steps would automatically insert all the blank cells with the value above them.
While this may look like too many steps, once you get the hang of this method, you’ll be able to quickly fill-down data in Excel within a few seconds.
Now, there are two more things that you need to take care of when using this method.
The first one is to make sure that you convert formulas to values (so that you have static values and things don’t mess up in case you change data in the future).
Below is a video that will show you how to quickly convert formulas to values in Excel.
In case you’re using dates in your data (as I am in the example data), you would notice that the filled-down values in the date column are numbers and not dates.
If the output in the date column are in the desired date format, you’re good and don’t need to do anything else.
But if these are not in the correct date format, you need to make a minor adjustment. While you have the right values, you just need to change the format so that it is displayed as a date in the cell.
Below are the steps to do this:
If you need to do this fill-down once in a while, I recommend you use this Go-To special and formula technique.
Although it has a few steps, it’s simple and gives you the result right there in your dataset.
But in case you have to do this quite often, then I suggest you look at the VBA and the Power Query methods covered next
You can use a really simple VBA macro code to quickly fill down cells in Excel till the last empty value.
You only need to add the VBA code to the file once and then you can easily reuse the code multiple times in the same workbook or even multiple workbooks on your system.
Below is the VBA code that will go through each cell in the selection and fill down all the cells that are blank:
Sub FillDown() For Each cell In Selection If cell = “” Then cell.FillDown End If Next End Sub
The above code uses a For loop to go through each cell in the selection.
Within the For loop, I have used an If-Then condition that checks whether the cell is empty or not.
In case the cell is empty, it is filled with the value from the cell above, and in case it is not empty, then the for loop simply ignores the cell and moves to the next one.
Now that you have the VBA code, let me show you where to put this code in Excel:
Copy-paste the VBA code into the code window
The above steps would run the VBA code and your data would be filled down.
If you want to use this VBA code again in the future, you need to save this file as a macro-enabled Excel workbook (with a .XLSM extension)
You can also add this macro to the Personal Macro Workbook and then use it in any workbook on your system.
Using Power Query is recommended when you’re using it anyway to transform your data or combine data from multiple worksheets or multiple workbooks.
As a part of your existing workflow, you can use the fill-down option in Power Query to quickly fill the blank cells.
To use Power Query, it’s recommended that your data is in an Excel Table format. If you can’t convert your data into an Excel table, you will have to create a named range for the data and then use that named range in Power Query.
Below the steps to use Power Query to fill down data till the next value:
While this method may sound a bit of an overkill, one great benefit of using Power Query is that it allows you to quickly update the resulting data in case your original data changes.
While the Power Query method works well, it’s best to use it when you’re already using Power Query in your workflow.
If you just have a dataset where you want to fill down the blank cells, then using the Go To special method or the VBA method (covered above) would be more convenient.
So these are three simple ways that you can use to fill down blank cells until the next value in Excel.
I hope you found this tutorial useful.
Other Excel tutorials you may also like:
You're reading Fill Down Blank Cells Until The Next Value In Excel (3 Easy Ways)
Do you want to lock cells in Excel to prevent unwanted changes in an Excel sheet? Here’s how to lock cells and protect sheets in Microsoft Excel.
Tip: also learn how to use Power Query and Power Pivot in Microsoft Excel.How to Lock All Cells in a Sheet
When creating a new sheet, all cells are automatically locked. However, there are cases when the last user keeps the cells unlocked manually. Here’s how to lock all cells in a sheet:
Open the Excel workbook containing the cells you want to lock.
Reenter the unprotect password.How to Unlock All Cells in Excel
Follow these steps to unlock all locked cells in a sheet:
Enter the unprotect sheet password when prompted.
Extra: Master VLOOKUP guide for Microsoft Excel here.How to Lock Specific Cells in Excel
You can lock specific cells in Excel and keep other cells unlocked in the same sheet by following these steps:
Highlight the cells you want to lock.
Reenter the unprotect password.How to Unlock Specific Cells in Excel
If you need to change specific cells that are locked, follow the instructions below to unlock them:
Enter the unprotect sheet password.
Highlight the specific cells you want to unlock.What You Can and Can’t Do when Locking Cells in Excel
What you can do:
Lock formulas in cells
Choose specific cells to lock and leave unselected cells unlocked
Protect your sheet and workbook with a password
Lock symbols in cells
What you can’t do:
Lock cells in the Web version of Microsoft Excel
Edit locked cells in a protected sheetHow to Protect a Workbook in Excel
You can lock an Excel workbook to protect it from the Insert, Delete, Rename, Move, Copy, Hide, and Unhide commands. Here’s how to protect a workbook:
Reenter the password.Frequently Asked Questions What will happen when I unprotect a protected sheet?
Once you enter the password for a protected sheet, you will need to create a new password or use the same password as before to protect it again with a password.Is it necessary to enable Protect Sheet after locking cells?
Yes, as locked cells can still be edited when unprotected. Therefore, locking cells with unprotected sheet is useless.
All screenshots by Natalie dela Vega
Natalie dela Vega
Natalie is a writer specializing in tech how-tos and gaming. When she’s not writing, she plays PC games and travels. Here at MakeTechEasier, you will see her write about guides, tips, and solutions for Windows and iOS.
Subscribe to our newsletter!
Our latest tutorials delivered straight to your inbox
Sign up for all newsletters.
In this post, we will show you how to count colored cells in Microsoft Excel.
While working with Excel, we often color-code cells to distinguish them from the rest of the data. This is good because the only concern is to grab someone’s attention. But when we color-code cells to indicate some value (for example, ‘green’ for approved and ‘red’ for not approved), we may require counting these values at some later point in time.
Excel offers plenty of functions, but sadly, none of them can be used directly to calculate the count of color-coded cells. Also, there’s no built-in way (whatsoever) to do so in Excel. However, there are workarounds to count colored cells in Microsoft Excel, which we will discuss in this post. So keep reading!How to count Colored Cells in Excel?
To count colored cells in Microsoft Excel, you may use the Find and Select tool or the Excel Filter and SUBTOTAL() function. Let us see both these methods in detail.1] Use the Find and Select tool
The Find & Select tool is used to find and select cells that meet specific requirements. It lets you execute the Find command, Find and Replace command, and Go To commands in Excel. With the help of the Find command, you can count the number of cells that have a specific background color. Here’s how:
Let’s say we have a worksheet wherein we have some sample data as shown in the above image. The data lists some blog posts that have either been scheduled or published on TheWindowsClub. Here, yellow color has been used to indicate that a post is scheduled, and green color has been used to indicate that a post is published. For this data, we can count the total number of scheduled posts as follows:
As you select the option, the Find and Replace dialogue box will disappear and your mouse pointer will turn into a plus symbol with a color picker next to it.
The dialogue box will further expand and show the list of cells that are color-coded in yellow. At the bottom of the dialogue box, you will see the count of these cells.2] Use Excel Filter and SUBTOTAL() function
The SUBTOTAL() function can be used to perform a calculation on a given range of cells. It can be used to apply other functions on the cell range while ignoring the cells that shouldn’t be part of the calculation. A total of 11 functions are supported by the SUBTOTAL() function.
It has the following syntax:SUBTOTAL(function_num,ref1,[ref2],...)
function_num is the numeric reference to the function that should be used in the calculation. It takes either 1 to 11 or 101 to 111 as value. For example, 1 or 101 for AVERAGE(), 2 or 102 for COUNT(), 3 or 103 for COUNTA(), etc. The variation in the numeric reference determines whether to include(1-11) or exclude(101-111) hidden cell values in the function.
ref1 refers to the cell range whose subtotal is required.
ref2 refers to another cell range for the calculation. This may go up to ref254.
Taking the same example as above, we can count the total number of scheduled posts using the SUBTOTAL() function as follow:
Place your cursor in cell A11 and type the following function in the Formula Bar on top:=SUBTOTAL(103,A2:A10)
Here, value ‘103’ indicates that the COUNTA() function has been referred to in the SUBTOTAL() function. Also, it indicates that hidden values will be excluded, if any. If you have numeric data in your worksheet, you may refer to the COUNT() function (2/102).
Since there are no hidden rows at this moment, the count comes out to be 9. When you manually hide rows with green cells, the SUBTOTAL() function automatically shows the updated results (8, 7, etc.).
If the data is quite large (which is obvious), manually hiding rows could be tedious. So you can add a filter to show only yellow-colored cells in the data range.
This will filter out yellow-colored cells. The result of the SUBTOTAL() function will also update based on the visible data.
Note: When SUBTOTAL() function is used on filtered data, hidden values are always ignored regardless of the function_num argument.
So this is how you can count colored cells in Microsoft Excel. I hope you find this useful.
Also Read: How to highlight Cell or Row with Checkbox in Excel.Can Excel count by colored cells?
There’s no built-in way to count colored cells in Excel, but there’s a trick. You can apply a color filter to the cell values and then count only visible cells by passing the COUNT() or COUNTA() function as an argument in the SUBTOTAL() function. The SUBTOTAL() function can be used to perform various arithmetic operations (sum, count, average, etc.) on a given cell range.Can you use Countif with colors?
Read Next: How to create a dropdown list with color in Excel and Google Sheets.
Watch Video – Lookup the Second, the Third or the Nth Matching Value
When it comes to looking up data in Excel, there are two amazing functions that I often use – VLOOKUP and INDEX (mostly in conjunction with the MATCH function).
However, these formulas are designed to find only the first instance of the lookup value.
But what if you want to look-up the second, third, fourth or the Nth value.
Well, it’s doable with a little bit of extra work.
In this tutorial, I will show you various ways (with examples) on how to look up the second or the Nth value in Excel.
In this tutorial, I will cover two ways to look-up the second or the Nth value in Excel:
Using a helper column.
Using array formulas.
Let’s get started and dive right in.
Suppose you are a training coordinator in an organization and have a dataset as shown below. You want to list all the training in front of an employee’s name.
In the above dataset, the employees have been given training on different Microsoft Office tools (Excel, PowerPoint, and Word).
Now, you can use the VLOOKUP function or the INDEX/MATCH combo to find the training an employee has completed. However, it will only return the first matching instance.
For example, in the case of John, he has taken all the three training, but when I look up his name with VLOOKUP or INDEX/MATCH, it will always return ‘Excel’, which is the first training for his name in the list.
To get this done, we can use a helper column and create unique lookup values in it.
Here are the steps:
Insert a column before the column that lists the training.
In cell B2, enter the following formula:
In cell F2, enter the following formula and copy-paste for all the other cells:
The above formula would return the training for each employee in the order it appears on the list. In case there are no training listed for an employee, it returns a blank.
How does this formula work?
The COUNTIF formula in the helper column makes each employee’s name unique by adding a number to it. For example, the first instance of John becomes John1, the second instance becomes John2 and so on.
The VLOOKUP formula now uses these unique employee names to find the matching training.
Note that $E2&COLUMNS($F$1:F1) is the lookup value in the formula. This would add a number to the employee name based on the column number. For example, when this formula is used in cell F2, the lookup value becomes “John1”. In cell G2, it becomes “John2” and so on.
If you don’t want to alter the original dataset by adding helper columns, you can also use an array formula to look up the second, third, or the nth value.
Suppose you have the same dataset as shown below:
Here is the formula that will return the correct lookup value:
Copy this formula and paste it in cell E2.
Note that this is an array formula and you need to use Control + Shift + Enter (hold the Control and Shift keys and press the Enter key), instead of hitting just the Enter key.
How does this formula work?
Let’s break this formula into parts and see how it works.
The above part of the formula compares each cell in A2:A14 with the value in D2. In this dataset, it checks whether a cell contains the name “John” or not.
It returns an array of TRUE of FALSE. If the cell has the name ‘John’ it would be True, else it would be False.
Below is the array you would get in this example:
Note that it has TRUE in 1st, 7th and 111th position, as there is where the name John appears in the dataset.
The above IF formula uses the array of TRUE and FALSE, and replaces TRUE with the position of its occurrence in the list (given by ROW($A$2:$A$14)-1) and FALSE with “” (blanks). The following is the resulting array you get with this IF formula:
Note than 1, 7, and 11 are the position of occurence of John in the list.
The SMALL function now picks the first smallest, second smallest, third smallest number from this array. Note that it uses the COLUMNS function to generate the column number. In cell E2, the COLUMNS function returns 1 and the SMALL function returns 1. In cell F2, COLUMNS function returns 2 and the SMALL function returns 7.
INDEX function now returns the value from the list in Column B based on the position returned by the SMALL function. Hence, in cell E2, it returns ‘Excel’, which is the first item in B2:B14. In cell F2, it returns PowerPoint, which is the 7th item in the list.
Since there are cases where there are only one or two training for some employees, INDEX function would return an error. The IFERROR function is used to return a blank in place of the error.
Note that in this examples, I have used range references. However, in practical examples, it’s beneficial to convert he data into an Excel Table. By converting into an Excel Table, you can use structured references, which makes it easier to create formulas. Also, an Excel Table can automatically account for any new training items that are added to the list (so you don’t have to adjust the formulas every time).
You May Also Like the Following Excel Tutorials:
3 Quick and Easy Ways to set up 3 Monitors in Windows 10 Improve the work or play experience with multiple monitors
If you want to use Windows 10 with three monitors, you will have an excellent desktop, and it’s not hard to set them up.
An easy keyboard shortcut will take you right to the monitor configuration menu.
The only thing left to do is to decide whether you want to duplicate the image on the other two displays or extend the desktop.
You can use the Detect option when the system doesn’t see the displays automatically.
INSTALL BY CLICKING THE DOWNLOAD FILE
To fix Windows PC system issues, you will need a dedicated tool
Fortect is a tool that does not simply cleans up your PC, but has a repository with several millions of Windows System files stored in their initial version. When your PC encounters a problem, Fortect will fix it for you, by replacing bad files with fresh versions. To fix your current PC issue, here are the steps you need to take:
Download Fortect and install it on your PC.
Start the tool’s scanning process to look for corrupt files that are the source of your problem
Fortect has been downloaded by
readers this month.
Does Windows 10 support three monitors? The answer is definitely Yes. Multiple monitor configurations are standard these days, as multitasking on a single screen is too restrictive.
Otherwise, the time spent moving or resizing windows would be wasted time.
So, in the article below, you will find out how to benefit from a multiple monitor setup on your device.Can Windows 10 support three monitors?
For the most incredible experience, Windows 10 includes several features and settings to support one, two, three, four, and even more displays without needing third-party applications.
You are prepared to begin if your computer has the necessary ports, connections, and graphics card to handle three monitors.Quick Tip:
If you use many displays at the same time, you will agree that it can be inconvenient at times. Because taskbars are frequently counter-intuitive, this might seriously disrupt your multi-display experience.
DisplayFusion can assist you in properly managing your multi-monitor setup, ensuring that your desktop wallpaper is shown appropriately to title bar buttons and multi-monitor taskbars.
Effective software for setting, tweaking, and optimizing multiple monitor displays.
Free trial Visit website
Let us tell you how to make this work without further ado.How do I set up three monitors on Windows 10? 1. Things to consider before setting up three monitors
For each added monitor, there’s a separate taskbar to help with keeping things organized.
You can find dedicated apps that can help make multi-monitor setup easier.
More specifically, dual monitors software brings several features to your device so that you can add, manage, or customize several monitors from one single hardware unit.
Furthermore, these tools allow you to resize and relocate all windows to your liking by using the built-in functions or creating your own.
You can set up multiple monitors using the ports on your graphics card and the ones on your motherboard.
Although you have more than two ports, it does not necessarily mean you can use them all simultaneously. To check this, you need to do a little research.
So open Google and specifically search for your graphics card model (e.g., NVIDIA Quadro K1200 three monitors).
If you find out that your graphics card does not support three monitors, the solution is to buy an additional graphics card. In this case, ensure enough space on your computer and enough slots.
If your monitor has DisplayPort multi-streaming support, you can use DisplayPort cables to connect extra monitors.
If you have trouble with your NVIDIA card, find in this guide what to do if the Nvidia graphics card is not detected on Windows 10.2. How to set up three monitors in Windows 10 2.1 Pick a Project type 2.2 Configure display 3. How to personalize your setup – taskbar and wallpaper
You can also choose how, where or when you want taskbar buttons to appear.
You can set up different wallpapers for each monitor or a folder full of images that can be randomly shuffled as desktop wallpapers.How many monitors can Windows 10 handle?
If you have read up to this point, you should already have a hint of what the answer should be.
For the most excellent experience, Windows 10 includes many features and settings to support four displays without needing third-party applications.
We hope we succeeded in showing you that using three displays is not that complicated once you have all the correct details and know they all go together.
Now go ahead and display three monitors in Windows 10, and have a great work or play experience.
Still experiencing issues?
Was this page helpful?
Excel is an amazing tool to store and analyze data. And many of the times, you will have to deal with text data types such as names, regions, departments, or product names.
In such cases, it’s good to know how to manipulate text data and get the desired result.
One of the most common tasks most Excel users have to do is work with a dataset of names. Often you’ll find that the first name and the last name are in separate columns, and you may have a need to combine these first and last names and get these as a combined name in a cell.
In this Excel tutorial, I’ll show you multiple different ways to combine the first and the last name in Excel.
You can easily do that using simple formulas (such as Concatenate or TextJoin) and features such as Flash Fill and Power Query
Suppose you have a dataset as shown below and you want to combine the first name in column A and the Last Name in column B.
Let’s have a look at some of the ways to do this.
Combining different text strings from different cells is quite easy in Excel. There is an in-built Concatenate formula in Excel that’s made for this purpose only.
Below is the formula that will combine the first and the last name (separated by a space character):=CONCAT(A2," ",B2)
CONCAT is a new function that was introduced in Excel 2023 and is made to replace the CONCATENATE function. But as of now, both the functions continue to be available and you can either function.
Below is the CONCATENATE formula if you wish to use that:=CONCATENATE(A2," ",B2)
The above formula simply takes the first and the last name and combines it. And since I want these to be separated by a space character, I have used ” ” (space in double-quotes) as the second argument.
You can also use the ampersand operator to do the concatenation.
Assuming you have the same dataset, you can use the below formula to combine the first and the last name:=A2&" "&B2
The ampersand operator combines the text before and after it. In the above example, I have combined three parts – first name, a space character, and last name.
Now that you understand the concept, you can combine the names in different formats if you want. For example, you may want to have the last name and then the first name, or a comma instead of the space between the names.
In case you only want the combined name and want to get rid of the first and the last name, you should first convert the formula values to static values. Once done, you can then remove/delete the first and the last name.
TEXTJOIN is a function that’s available in Excel 2023 and Office 365.
In case you have access to this function, it’s best to use it for combining cells and columns (as it’s a lot better than the above CONCATENATE and ampersand methods).
Suppose you have the dataset as shown below and you want to combine the first and the last name.
Below is the formula to do this:=TEXTJOIN(" ",TRUE,A2:B2)
The above TEXTJOIN function takes three arguments:
The delimiter, which is a space character in double-quotes in this example (since we want the first and the last name to be separated by a space character)
A Boolean value where TRUE means that in case there are any blank cells, the formula will ignore it
The range that has the cells that you want to combine
It’s faster than the regular concatenate formula and is also easier to create and manage. So if you have access to the TEXTJOIN function in Excel, it’s better to use it over any other formula.
Flash Fill is a smart functionality that tries to understand the pattern and give you the result.
Let me explain how it works.
Suppose you have a dataset as shown below and you want to combine the first and the last name.
Below are the steps you can use to do this using Flash Fill
In cell C2, enter the result you want. In our example, it would be ‘Bobby Baker’
In cell C3, start typing the expected result. You will notice that Excel shows you the expected result in all the cells (in the light gray text). This is Flash Fill in action
Hit the Enter key
The above steps would instantly fill all the cells with the combined name.
In some cases, it’s possible that you won’t see flash fill while you are typing in the second cell.
Don’t worry, it happens sometimes.
In such a scenario, below other steps you can use to make Flash Fill work:
In cell C2, enter the result you want. In our example, it would be ‘Bobby Baker’
Select select C3
The above steps would instantly pick the pattern from the cell above and fill the entire column with the combined name.
In case Flash fill isn’t able to pick up the right pattern and gives incorrect result, fill two cells manually and then do the above steps.
You can also use the keyboard shortcut Control + E to fill using Flash fill.
Combining the first and the last name (or even the first, middle, and last name) is a simple operation that Flash Fill can easily handle.
Keep in mind that Flash Fill is not perfect. It works by identifying patterns and using the same pattern to fill all the cells in the column. While it’s most likely to work as expected, it’s a good idea to double-check the result of Flash Fill.
Power Query is an amazing tool that used to extract and transform data.
You can also use this to quickly merge columns and combine the first and the last name.
For Power Query to work, your data needs to be in an Excel Table (or at least a Named Range).
For the purpose of this tutorial, I will convert the data set that has the 1st and the last name into an Excel Table.
Suppose you have a data set as shown below and you want to merge the two columns to get the full name.
Below are the steps to convert the data into an Excel Table:
Select any cell in the dataset
In the Create Table dialog box, make sure the range is correct
The above steps would convert the data range into an Excel Table.
Now let’s see how to combine the first and last name using Power Query:
Select any cell in the table
In the Power Query Editor, make sure the right table is selected in the left pane. If you just have one table, you will only see one option in the left pane
In the Merge Columns dialog box that opens, select Space as the delimiter (from the drop-down)
Enter a name for the new merged column. I will go with ‘Full Name’
The above steps would insert a new worksheet in the workbook with a table that has one column that has the full name.
Compared to the formula methods and Flash Fill, Power Query is definitely a bit longer.
But the benefit of using this method is that in case your original data changes, you can quickly refresh the query and your resulting data would automatically update.
Also, Power Query is widely used to combine different tables and data from multiple worksheets and workbooks. So, in case you have the name data you want to combine, it’s one single step in your already existing power query workflow.
In this tutorial, I have covered how to combine the first name and the last name in Excel. But in case you have the first, middle, and last name, you can use the same methods to do it.
I hope you found this tutorial useful.
Other Excel tutorials you may also like:
Update the detailed information about Fill Down Blank Cells Until The Next Value In Excel (3 Easy Ways) on the Tai-facebook.edu.vn website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!