web 2.0


Excel Highlight the Active Cell

In a video (http://www.youtube.com/watch?v=bGjqDGF7xaM) published on YouTube back in 2008, I explained how to highlight the active row in Excel. In this brief article, I discuss how you can highlight the active cell in Excel. In this particular case, I will only change the font color of the cell, but you can later change the conditional formatting and apply whatever formatting you wish.

Here's how it is done:

1. Create a named range called AddressOfActiveCell using the formula: =ADDRESS(5,6)
2. Select the entire worksheet and apply a conditional formatting using the formula (the active cell being A1 upon selection): =ADDRESS(ROW(A1),COLUMN(A1))=AddressOfActiveCell
3. Now, open the visual basic editor and insert the following code:


Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As
Range)

    With ThisWorkbook.Names("AddressOfActiveCell"
)
        .Name =
"AddressOfActiveCell"
       
.RefersToR1C1 = "=address(" & ActiveCell.Row & "," & ActiveCell.Column &
")"
   
End
With

End
Sub

Check the video tutorial here:

Tags: , , , , ,

Microsoft Excel - VBA

Excel 2010: Conditional Format Data Bars Improvements

Excel 2010 reinvents the conditional format for data bars. We now have more control over the conditional formatting as a whole and not only databars; however, with data bars we now have the option to plot negative values as well.

Here’s how it looks like:


Figure 1: Excel 2010 Conditional Format Data Bars

Once we apply one of the built-in conditional formats for data bars, we can access the Conditional Format Manage Rules dialog box in order to edit the new conditional format rule:


Figure 2: Determining Negative Value and Axis...


Finally, you can determine various aspects of how the value are displayed as well as the axis:


Figure 3: Determining data bars aspects such as axis settings

Tags: , , ,

Microsoft Excel | Microsoft Office 2010

Excel 2010 No Cell Icon

Excel 2007 introduced Icon Sets to Excel Conditional Formatting. Excel 2010 introduces No Cell Icon to Conditional Formatting. In Excel 2007, after applying your Icon Set Conditional Format, you would get something like this:


Figure 1: Icon Set Conditional Format

The problem, of course, is that the whole this is a mess. If the idea is to identify poor grades, you’d need to create extra Conditional Formats so that you could hide the undesired icons. Excel 2010 introduces No Cell Icon which removes the need for extra formulas and extra Conditional Formats. Here’s how it looks like:


Figure 2: No Cell Icon

By choosing No Cell Icon, Excel 2010 will omit the icons for the selected conditions saving you all the hassle of extra conditioning:

 


Figure 3: Result after applying No Cell Icon

Tags: , ,

Microsoft Excel | Microsoft Office 2010

How to: Excel 2007 Conditional Formatting using formulas

Let us suppose that you have a list. In this list, you want to identify the cells that contain a certain text. Figure 1 shows the initial setup of our problem:



Figure 1 -
Conditionally formatting based on text in a cell

What we plan to do is to identify the products that contain the word “used” (for now). We show you two different ways to get this done.

In the first example, we type in the word directly into the formula. In the second example, we do this by using a validation list from where you can choose what to look for and then the CF is applied.

To begin with, choose the area containing the data (starting from the top-most cell). Add a new rule and choose the option Use a formula to determine which cells to format. In the formula box, you must enter the following formula: =IF(NOT(ISERROR(FIND("used",A1,1))),1,0)=1. Choose the formatting of your liking. Figure 2
shows the step visually:


Figure 2 -
Entering the conditional formatting formula

Obviously that, as it is, the conditional formatting is pretty much useless to us. What if we want to format whenever the word “new” comes up? Or when “repaired” comes up? In theses case it does not take a genious to figure out that we’re in serious trouble. It is simply not practical keep changing the value around everytime we need to conditionally format based on a word found in the text.

The solution is to implement a truly functional formula. In this case, we can use a data validation list to choose from (we discuss data validation in details in the second part of this eBooklet).

Here are the steps:

·        
Type in the word “repaired, used and new” in the range F1:F3;
·        
Select cell D1 where the data validation will be inserted;
·         Open the data validation tool (Data tab à Data tools group à Data Validation splitbutton à
Data validation button);
·        
From the Allow dropdown list, choose List;
·        
In the Source field, choose the range F1:F3;
·        
Click OK to finish.

Now, when you click on D1, you will get the validated list as shown in Figure 3
:


Figure 3 -
Validation list to be used in our conditional formatting

Now, all you need to do is to change the original formula to point to cell D1 as shown in
Figure 4:


Figure 4 -
Edited formula

If you are wondering above the “=1” at the end, we only added this to make it explicit that the formula is evaluating to 1 (true) so that the conditional formatting can be applied. There is not need to have the “=1” at the end of the formula. It is entirely up to you.

You can now select from the validated list any of the values and see your conditional formatting at work as shown in Figure 5
:


Figure 5 - Final step o four conditional formatting with data validation


You may also want to read this article (
http://www.excelguru.ca/blog/2009/04/23/making-an-icon-set-show-only-two-conditions/) from my fellow MVP, Ken Puls.

Tags: , , , , , ,

Microsoft Excel