cell color assistance for excel

N

new user

How to do formatting of cells automatically by writing Macros when the data
is extracted from any tool to excel
 
S

Simon Lloyd

new said:
How to do formatting of cells automatically by writing Macros when the
data
is extracted from any tool to excelI think you need to be a bit more specific about where the data is
coming from?, what would be the reason/parameters for colouring the
cell(s)?

You can always make a good start by using the Macro recorder whilst
performing the task!


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
 
S

Sri

new user;357439 Wrote:> How to do formatting of cells automatically by writing Macros when the

coming from?, what would be the reason/parameters for colouring the
cell(s)?

You can always make a good start by using the Macro recorder whilst
performing the task!

--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)

To start with you might check the below link

http://funwithexcel.blogspot.com/search/label/Color

Hope this helps. If you let us know the specific formats or conditions
that you are looking, then we can answer accordingly. (or) you can
tweak the code on your own by the examples provided in the above link
 
S

Sanjay

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top