Tuesday, February 1, 2011

Specifying a Browser in a Hyperlink

Specifying a Browser in a Hyperlink

Summary: Excel allows you to easily add hyperlinks to a worksheet. Click on it, and the target of the link is opened in a browser window. If you want to specify which browser is used to display the link, things get more complex. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, and Excel 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Specifying a Browser in a Hyperlink.)

Sunny wants to include a hyperlink in a worksheet. However, he would like the hyperlink to "force" the target of the URL to be displayed in a particular browser. For instance, he would like the hyperlink to somehow specify that the target be opened in Internet Explorer.

There is no way to do this within Excel; a hyperlink in a worksheet, when clicked, relies on whatever the default browser is on the system being used. There is a workaround that you can try, however: You could create a macro that actually opens a target address using a specific browser.

For example, consider the following macro. It automatically opens an instance of Internet Explorer and opens my blog in that browser:

Sub LaunchIE()
    Dim IE As Object
    Set IE = CreateObject("InternetExplorer.Application")
    IE.navigate "
http://naveekuma.blogspot.com/"
    IE.Visible = True
    Set IE = Nothing
End Sub

The macro could easily be assigned to a shortcut or to a toolbar button. It isn't terribly flexible, however, when it comes to which browser is being used (it is always Internet Explorer) and which site is displayed (it is always the ExcelTips site). You can make it a bit more flexible in this manner:

Sub showURL(browser As String, URL As String)
    Dim pPath As String
    Dim bPath As String
    'Use this to resolve the correct program file path
    'it is different on 32-bit and 64-bit systems
    pPath = Environ("ProgramFiles")
    If browser = "Firefox" Then
        bPath = pPath & "\Mozilla Firefox\Firefox.exe"
    ElseIf browser = "IE" Then
        bPath = pPath & "\Internet Explorer\iexplore.exe"
    Else
        Exit Sub
    End If
    Call Shell(bPath & " " & URL, vbNormalFocus)
End Sub
Sub Testing()
    Call showURL("Firefox", "
http://msofficeadvise.blogspot.com/")
    Call showURL("IE", "
http://naveekuma.blogspot.com/")
End Sub

Note that the main routine—showURL, the one that does all the work—can work with either Internet Explorer or Firefox. The Testing routine shows how to launch the browsers; all you need to do is specify which browser you want and what URL you want to open in that browser.

MS Office Tips is your source for effective Microsoft Excel learning. This tip applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003


Tags: Browser in a Hyperlink, add hyperlinks to a worksheet, include a hyperlink in a worksheet

Wednesday, December 22, 2010

Three Conditional Formats

More than Three Conditional Formats

Summary: Conditional formatting is a great feature for making the data in your worksheets more understandable and usable. What if you need to define a conditional format that has more than three conditions? Here are a few ideas. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, and Excel 2003.) 

The conditional formatting feature of Excel is very powerful. For complex formatting, however, there is one drawback for most Excel users: The conditional formatting feature only seems to allow up to three conditions to be defined.
This is actually a bit misleading. There are actually four conditional formats that can be specified. The fourth one is the format that is used by Excel if none of the three conditions specified in the Conditional Formatting dialog box is true. (In other words, the way you format the cell to begin with is the fourth format.)

If you simply need to define additional conditions, without the need of corresponding formats, you can design formulas to use in the conditions. These formulas can use the OR, AND, and NOT functions. For instance, if you want cell B5 to be colored red when the cell value is outside the range of 5 to 10, or it is not a number, you can use the following condition:
 
=OR(B5<5,B5>10,NOT(ISNUMBER(B5)))

In order to enter this formula into the Conditional Formatting dialog box, make sure you specify "Formula is" instead of "Cell Value Is" in the condition. You would then change the formatting for the condition in the dialog box so that it is red. Similar "compound formulas" can be designed for other complex conditional needs.

If you need to define additional conditions—more than three—and you need different formats for each of the conditions, then you are out of luck. In that instance, you will need to use VBA macros to check your conditions and modify cell formats accordingly. (You could also upgrade to a later version of Excel such as Excel 2007 or 2010. Both of these versions will easily handle more than three conditional formats.)


Improve your presentation skills


Presentation Tips
Improve your presentation skills























Tags:  PowerPoint, Presentation Skills, Presentation Tips, Effective Presentation, Slides

Rupee Symbol of India

New Rupee Symbol of Indian Currency
How to use it in Computers?

Step 1: Download the font from the link : https://docs.google.com

Step 2 : Save the downloaded file to "fonts" folder of your PC : 

Step 3: Location : C:/Windows/Fonts and then go to the C:/Windows/Fonts location and install (double click)

Step 4: Open your word processor like Microsoft Word and select the "Rupee_forindian”


Step 5: Just select "Rupee" font from the drop down list of your fonts in your application and press the key just above your tab button. It will display the new rupee symbol of India. Try it.

Result: