Wednesday, 15 April 2015
Friday, 27 February 2015
Excel Date format
To change the format of a date value, select the cell and then open the Format Cells dialog box.
The Format Cells dialog box can be
opened by using the following ribbon icon:
Home > Format > Format Cells
Custom Date Codes
There are many built-in custom
formats that you can select from the list, or, you can enter a custom
format code into the Type field. When you enter a custom format code, you have
great flexibility in how you display the month, day, and year. For
example, if you want the show the month name fully spelled out, you would use
code mmmm. If
you want to show the month as a three-letter abbreviation, you would use code
mmm.
Keep Learning & Keep Sharing
Sanjay BAKSHI
Sunday, 22 February 2015
Excel : Changing Font and Size Conditionally
Is there a way to use Excel's
conditional formatting capabilities to change the font used in a cell or to
change the font size in a cell. The short answer is no, that can't be done—at
least not with conditional formatting.
You can, however, use a macro to examine cell
contents and make changes in the appearance of a cell. Consider the following
macro, which examines any cells you have selected when you run the macro. If
any of the cells have a length of more than two characters or a value of more
than 20, then the cell's font is changed.
Below are the steps to follow
1) Open Excel
2) Click on Developer Tab
3) Click On Macro
4) Write below Macro Code
Sub Check_Conditional_Formattinf()
Dim rCell As Range
For Each rCell In
Selection.Cells
If Len(rCell.Text)
> 2 Or _
Val(rCell.Value)
> 20 Then
rCell.Font.Name
= "Cambria"
rCell.Font.Size
= 30
Else
rCell.Font.Name
= "Arial"
rCell.Font.Size
= 12
End If
Next
End Sub
5) Open Excel
6) Write from 1 to 100 in Cell A1 to A100
7) Select Cells
8) Run Macro
and here will be the result...
Keep Learning
Sanjay Bakshi
mesanjaybakshi@gmail.com
Subscribe to:
Posts (Atom)



