Default Border Color Index

Jun 18, 2009

When I launch excel 2007, i have cells with a grey border. I'm not sure what the colorindex is of this border.

Through a macro, when I format cells, I use

Cells(x,y).BorderAround ColorIndex:=xlAutomatic

xlAutomatic points to BLACK by default. Could someone tell me how I could reference the actual default colorindex (the grey one which seems to border all other cells, while not being xlAutomatic)?

View 2 Replies


ADVERTISEMENT

Add A Textbox At The Current Position (selected Cell) With A Set Size, Fill Color, And Border Color

Nov 2, 2008

I'm trying to add a textbox at the current position (selected cell) with a set size, fill color, and border color. I found this: http://msdn.microsoft.com/en-us/libr...8(VS.80).aspx:

View 2 Replies View Related

Excel 2010 :: Highlight Active Row - Change Default Border And Fill?

Jan 13, 2013

Using Excel 2010. Is it possible to change the default line thickness and fill color when selecting the ActiveSheet Target Row below?

I would like a thin border and a light grey fill - without interfering with any fomatting or conditional formatting that has been applied to the worksheet.

View 1 Replies View Related

VB Border Color Code

Nov 6, 2007

part of my code looks like this. Instead of it being if c.interior.colorindex i want it to be if top border color = 4.

How do i syntax this?

For Each c In Worksheets("Sheet1").Range("B7:DE7").Cells
If c.Interior.ColorIndex = 4 Then Range("DH7").Value = Range("DH7").Value + c.Value
Also, is there a way to specify Range("DH") and make the row be the current row, not hard coded to 7

View 9 Replies View Related

Format Border Color Based On Value

Nov 1, 2007

I found this code (compliments of Andy Pope) which fills a background color based on its corresponding cell value. (then offsets all uniformly)

View 9 Replies View Related

Background Color And Border Around Macro

Aug 6, 2008

I am trying to develop an Excel spread- sheet by using some macros. In detail, in my first worksheet, I have something like -

Exp1 ....
Exp2 ....
Exp3 ....
:
:
:
Expn ....

This rows are coming from another worksheet and I have used a macro (developed by me) to populate these rows. Even the number of rows to be populated is not fixed.
However, I would like to add one row with text - " Total Expense" after those rows. This row will have some background color - say Tan - and font color - say Green - and also a border around its own - in nature, the border will be thick, Double and with color Rose. I have tried the following code in macro but not working properly -

Sub Include_Fields_n_Format(loc As String)
tot_exp_scell = loc & f_scell
tot_exp_ecell = loc & (f_scell + 1)
Range(tot_exp_scell, tot_exp_ecell). Merge
Range(tot_exp_scell, tot_exp_ecell).WrapText = True

Range(tot_exp_scell, tot_exp_ecell).Interior.Color = RGB(150, 150, 150)
With Range(tot_exp_scell, tot_exp_ecell).Font...................

View 4 Replies View Related

Border Color Issue In Excel 2003

Jan 6, 2009

I am trying to assign a border and fill to cells, of identical colors, using VBA. Simple enough, yes? I am using the same RGB value for both the fill and the border, but in Excel 2003, they are assigned two different colors: the fill is the correct shade, but the border is not, which makes absolutely no sense to me. I could understand if both colors were slightly off from the shade I'm getting in 2007, but to have one be correct and the other not? I can manually assign the border to be the proper color, but this doesn't help.

The code is:

View 14 Replies View Related

Change Line Border Color Of Shape

Sep 21, 2007

I have this simple code which sets the objects format as default.

Private Sub FormatTextBox()
ActiveSheet.Shapes("FormatBox").Select
Selection.ShapeRange.SetShapesDefaultProperties
End Sub

Is there a way to set an objects shape to the default format...not as default?

ie: if the default line color is blue. what code could i use to set an object with a black line color, to the default blue?

View 3 Replies View Related

Change Textbox Border Color - Visible Or Hidden

Mar 8, 2012

What command I would use to change the text box border color, and set text border to visible or hidden?

View 3 Replies View Related

Find Specific Phrase In A Column And Change The Row Color And Its Border

Mar 27, 2014

I have the table, as shown on left in the appended image, and the final result should be the right one.

The steps are written as 1, 2, 3 and 4.

Untitled.png

View 13 Replies View Related

Change Columns Fill Or Border Color Based On Current Date

Aug 21, 2014

I have a simple spreadsheet. A column for a persons name and 31 columns, one for each day of the month. I want to apply conditional formatting, either fill color or border color, to the date column of the current date when the spreadsheet is opened.

View 2 Replies View Related

Restoring Default Tab Color In VBA

Oct 23, 2009

I don't believe this is an excel 2007-specific question, but if it is & should be relocated to a different forum, move or ask me to move it.

I'm writing a personal macro in excel 2007 (win xp pro) that uses a userform to change the sheet name and tab color. The problem is that my option to change the tab color to "None" doesn't actually restore it to the standard light-blue background and blue type.

View 4 Replies View Related

Change Default Color With VBA

Jan 18, 2008

I am setting the fill color of a cell by setting the .Interior.Color property and using the RGB() VBA function. My VBA code saves the spreadsheet in Excel2003 format at the end of the creation process. This has worked great and my spreadsheets looked correct when reopened in Excel 2007. When these same spreadsheet files are opened in Excel 2003 the colors are all very different. Does Excel 2003 handle colors differently than Excel 2007? Is there a preferred way to specify colors that will work on both platforms?

I have attached a specific example. The color is #B4CF27 or RGB(180, 207, 39). When I open this sheet in Excel 2007 the color is a shade of green (the desired color). When I open it on Excel 2003 I get yellow. I tried swapping the red and blue values thinking there might be some byte ordering issue and it does not produce the yellow on Excel 2007.

View 2 Replies View Related

Default Background Color Is Purple?

May 4, 2009

When I open a new worksheet it is purple. The fill color bucket it defaulted to no fill. I select the entire worksheet and click on the 'no fill' and get a normal white background. If I delete anything on the spreadsheet, where the items were deleted the background is again purple. I have to select and again click on 'no fill'. I am constantly fighting this creaping purple. Just started about a week ago.

View 4 Replies View Related

Change Default Cell Color?

Mar 10, 2014

I would like to change the default color of any excel sheet I use to grey from the standard white and I am struggling to find out how this is achieved.

In other words, I am trying to have all cells in the sheets I work with appear grey on my screen by default. A coworker of mine used to work in banking and she has grey cells but does not know how she changed them.

View 1 Replies View Related

Change Default Color Palette

Aug 15, 2008

I'm trying to change the default colour palette for "fill colour" and "font colour". The way I've been doing it before, is to have a spreadsheet with the colour palette I want in my XLSTART folder, and then when I open a new document, going to tools->options->color->copy colors from, and selecting that spreadsheet.

However, this is a pain, and I was wondering if I can just set the colour palette to have my colour scheme already there, whenever I create a new spreadsheet.

View 3 Replies View Related

Change Default Chart Type & Color

Sep 7, 2007

I was just wondering if there was a way of changing the excel chart default so it doesn't always return a grey (or gray for those of you over the pond !) plot area every time I create a chart. It looks rank and wastes toner IMO.

View 8 Replies View Related

Change Default Text/Font Color

Apr 16, 2008

I was just wondering how I can type in a different colour. I.e. I have a document and I want to type in random cells but I always want to be typing in red, or blue etc. Hoe can I change the default text color?

View 8 Replies View Related

Reset Colors Back To Default Color Scheme

Mar 12, 2008

I'm not sure what I have done but one of my workbooks colour scheme has changed. When viewing the workbook cells are now grey and the lies are a lighter grey. When printing though it prnts as it would normally ie a white backgorund. It looks like the viewing colours have been reversed and I can not find out how to revery back to normal.

View 3 Replies View Related

Excel 2010 :: Changing Cell Color And Border By Clicking A Cell

Apr 25, 2014

I would like to accomplish 2 things in my Excel 2010 spreadsheet by click a cell which already has a number and formatting in it.

1. How do I change the color of the cell, the color of the number in it, and the border around it. (Make it look like I just pressed a button by clicking it.)

2. At the same time have the text in different cell and the number in the selected cell appear in another different cell. (Text in a different cell = A , and the number in the selected cell = 23, the value in the resulting cell be "A 23") Everything I would like to happen at the same time by clicking the selected cell. I would also like this to be done several times by clicking different cells and not changing the previously selected cells.

View 1 Replies View Related

Add The Color Index Into A Column

Mar 19, 2007

i would like to add some sorting code by colors and i need to add the color index into a column in the same file + below formula = colorindexofcell(a1,false,true) i need to exclude 2 columns for deleting the report.To reason for that everyday we run the report and next time there are new entries and report needs to be run again

when i double click anywhere on report sheet it deletes the colorindex and formula column as well is there anyway to modify below code by excluding two rows such as "ag" and "ah" column,for deleting process

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Call Delete_Report

Range(Range("a1"), Cells(Cells.Rows.Count, 1).End(xlUp)) _
.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
unquote

View 9 Replies View Related

Font Color Index

Apr 23, 2007

I have a spreadsheet which has some cells with blue font. If anyone tries to manually change the contents of these cells a worksheet change macro reads the colour index of the font and, if it is 5 (blue), uses "application.undo" to repair the damage.

When I use the sheet on another computer, the same font colur is being read as a four digit number, 4015 I think from memory, and the code doesn't work.

View 9 Replies View Related

Find Index Number Is The Color Of Red

Apr 17, 2009

I am editing code that changes a cell's forecolor and I can't seem to find the number for red. What number is red

View 9 Replies View Related

If Any Cell Is (red) Has A Color Index Of 3, Bring The Whole Row To The Top

Jul 9, 2009

I have a worksheet with several columns and 1,000's of rows. I have code that makes all "good cells" grey (color index 15) and all "bad cells" red (color index 3).

I would like to do 2 things...

1. If ANY cell is RED, cut the WHOLE ROW and "insert cut cells" below the header row (even if ALL other cells are grey), then repeat the process up the whole worksheet until ANY row with a red cell is at the top.

2. Create a new worksheet named "Trouble Cells", copy the header row along with any rows with red cells.

I would like to keep the formatting the same (for example, the title row is always yellow and is "28" high and all other rows are a height of "12").

I would also like to keep the column width of each column in the new worksheet as well.

Excel 2002

View 9 Replies View Related

Copy Row Based On Color Index

Oct 20, 2006

to loop through each row in sheets("Layer Layout") and check if there are any red fonts in its cell..If there is, i need to copy the header ("A1") and the rows containing the red fonts to sheets("Report")..

View 9 Replies View Related

Sum Cells Based On Color Index

Nov 13, 2006

I am trying to use a function kindly listed by Dave, that allows for a SUM to be done on cells which have a certain color index. I have modified it very slightly, but unable to set the call to it without getting errors, perhaps someone can shed some light on what i am doing wrong. Dave's original code is

Function ColorFunction(rColor As Range, rRange As Range, Optional SUM As Boolean)
Dim rCell As Range
Dim lCol As Long
Dim vResult
lCol = rColor.Interior.ColorIndex
If SUM = True Then
For Each rCell In rRange
If rCell.Interior.ColorIndex = lCol Then
vResult = WorksheetFunction.SUM(rCell,vResult)
End If
Next rCell
Else
For Each rCell In rRange
If rCell.Interior.ColorIndex = lCol Then
vResult = 1 + vResult
End If
Next rCell
End If
ColorFunction = vResult
End Function.......

View 4 Replies View Related

Loop Through Range By Color Index

Jun 16, 2007

I have a bit of VBA code that loops through a range and looks at the color index. If it is color index three then it will put a "1" in the cell six columns over. This code works, but I see over and over again that loops are bad and inefficient. Since I am working on my code being more efficient I wanted suggestions for altrenate code that would do basically the same thing.

Dim Bcell As Range
For Each Bcell In Range("D2:D304")
If Bcell.Interior.ColorIndex = 3 Then
Bcell.Offset(0, 6) = "1"
Else
Bcell.Offset(0, 6).ClearContents
End If
Next Bcell

View 4 Replies View Related

Formula Check The Color Index Of A Cell

Oct 12, 2006

Is it possible to have a formula check the color index of a cell?

Example if A1 color index = 6 then X

View 9 Replies View Related

Check Cells For Color Index And Delete

Jul 25, 2008

I am trying to write some code and I am lost.

Column Y-has Y, N entered in cells
Column R-has 1,2, etc... entered in cells (some cells have color index 26)
Column O-has 1, 2, etc... entered in cells (some cells have color index 3)
Column G-has names entered entered in cells (some cells have color index 38)

I need the macro to check if Column Y has a "N" and then if it does check Column R, O, G and if there is no color index in any of the Columns the macro will delete the row.

If Column Y has a "N" but Column R, O, G has a color index it will not delete the row.

There are 3000 rows on the spreadsheet and the macro would need to go through all the rows.

View 14 Replies View Related

Find String Of Text Plus Cell Index Color?

May 3, 2013

I am trying to come up with a macro that will search a range for a specific string of text plus Interior.ColorIndex = 4. The range can have the text in it multiple times but i only want the macro to fire the next line of it if the cell address also has that color. Is there a way that can be done? My code below stops after it finds its first occurrence of the string and moves on to the next lookup. How do i make it look for not only the value but the index color?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved