Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
H! there,
Do below steps- 1. Open Excel, Press Alt+11 to open Visual Basic for Application (VBA) window. 2. Here you will find the Project Window, Double click the "Sheet1" item in the window 3. Paste the below code here. Private Sub Worksheet_SelectionChange(ByVal Target As Range) With Selection.Interior .ColorIndex = 37 .Pattern = xlSolid End With Selection.Font.ColorIndex = 5 ActiveCell.FormulaR1C1 = "Sanjay" End Sub 4. Save it by pressing Ctrl + S key 5. Go back to Excel using Alt + tab key 6. now try Clicking in the sheet1 and see the effect of your code which you wrote in VBA. This is a small part of Macro, you can do it better than this. I would suggest you to learn these things with Micro Recorder. Read online help.! Good Luck, Sanjay "new user" wrote: How to do formatting of cells automatically by writing Macros when the data is extracted from any tool to excel |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't format cell color/text color in Office Excel 2003 in fil | Excel Discussion (Misc queries) | |||
Excel: Syntax to change cell color based on color of another cell | Excel Worksheet Functions | |||
Can't format cell color/text color in Office Excel 2003 in files . | Excel Discussion (Misc queries) | |||
Applied color to excel cell but no color appears | Excel Discussion (Misc queries) | |||
Need assistance with cell formatting | Excel Worksheet Functions |