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
ADVERTISEMENT
Oct 21, 2008
I have an excel sheet in which many cells have a background color of Green. These cells are located all over the sheet. I want to change the background color from Green to Red not affecting the color of other cells in the sheet.
I will be realy really thankful, as I have to do this exercise for more than 50 worksheets.......If I start doing it manually by selecting each celll with green color background and changing it to red.....you can well imagine my condition.....my life would get shorten significantly while doing this.
View 6 Replies
View Related
Apr 20, 2014
i am looking macro code to extract data from sheet1 to sheet2 & sheet3, with criteria background color :
1) extract data from sheet1 to sheet2 for data contains/highlighted yellow color background
2) extract data from sheet1 to sheet3 for data contains/highlighted red color background
For detail information, see attached workbook : extract after coloring.xlsx‎
View 3 Replies
View Related
May 17, 2013
with performing the following tasks with VBA:
1). For each cell that in the range that has a Red background delete the entire column
I have attached a sample spreadsheet where I have tried to do this. It's not quite working. It does not seem to work when there are RED cells next to each other.
I know that I can do a simple thing like column("A:A"), but I'd rather have it in a loop as in the sample code, in case the columns change in the future.
2). The second task is to delete the rows in the spreadsheet where the first cell in the row is a blank.
View 4 Replies
View Related
Mar 15, 2013
creating a macro. I would like the background color of certain cells under column A (cells 12:25, 27:32, 34:38, 40:45, 47:51, 53:61, 63:70, 72:79, 81:88, 90:92) to change to the color green and display the text "Complete" on mouseclick.
Before the cell is clicked, it would be the color red, with no text. (I'm not sure if you need to know that).
Next, I would need a macro that resets everything back to red. I hope this macro could be assigned to a form button.
View 1 Replies
View Related
Sep 17, 2008
My boss wants a spreadsheet that has multiple buttons on it that will change the background color of a specific cell to four different colors. Example:
Text written in Cell B3, Button in Cell A3 that will change the Background color of Cell B3 to either Green, Yellow, Red or Blue.
There will be a lot of buttons on this worksheet following the same format as above. I don't want to change the value of what is in the cell, just the background color.
View 7 Replies
View Related
Jul 4, 2007
As i navigate excel, I was wondering how to change the background or highlight (instead of bold border) the active cell?
View 3 Replies
View Related
Apr 19, 2014
I am looking some macro code to extract data based on background color (yellow color) from sheet1 to sheet2
for detail like this below :
table.tableizer-table {
border: 1px solid #CCC; font-family: Arial, Helvetica, sans-serif
font-size: 12px;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #ccc;
}
[Code] ........
View 5 Replies
View Related
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
Aug 19, 2009
how I can alternate the background color (fill color) of rows in a spreadsheet. Say I wanted every other row to be gray starting at row 10.
View 6 Replies
View Related
Dec 12, 2007
In excel 2000, I am trying to count the lines in a spreadsheet that has the first cell in each row highlighed in yellow. Additionally, I am trying to count the number of rows that has a red font used in the cell in column D.
I have reviewed other posts by searching counting highlighted cells, but I do not understand how to complete the entire process. One of the suggestion was to create a vb script in combination with using =cellindex(??). I do not really understand how to create this, name it and the run it.
View 8 Replies
View Related
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
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
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
View Related
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
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
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
Nov 19, 2012
Try to find a way to automatically change the color of a row, based in changing the name in column A.
I tried conditional formatting but the name (or dates) in column A are not the same (always other and other).
I failed to adapt any VBA CODE (found in GOOGLE) because column A varies a lot.
Annex a photo and an excel example.
EXAMPLE FORUM HELP.jpg
EXAMPLE 1.xlsx
View 9 Replies
View Related
Apr 7, 2014
Is there a way to count the background color from a range of cell? for example: In a range of A1:B5 there are 5 cells highlighted with yellow background, the formula should give me 5 counts for yellow background.
View 11 Replies
View Related
Jul 30, 2014
I have a given som (general) range where I would like a function to change the background color of every second row in a visual basic function.
One could of course just loop through it and use the mod function, but I think there has to be something quicker.
I know about conditional formatting, but it is something I need to use over and over again on Ranges that will differ in size so I would like it to be a function I can just run as part of a sub.
View 1 Replies
View Related
Dec 29, 2008
How can I add some code to the routine below in order to change the background color into green?
View 7 Replies
View Related
Aug 26, 2009
How to color the background cells using text ...
View 6 Replies
View Related
Jan 24, 2013
There is a color i like to use alot for shading cell background, and i'd like to add it to the background color dropdown. Now, i get to it by clicking "more colors" and then selecting it from that dialog. This is a lighter shade of yellow. I swear it used to be on the dropdown, but i believe it was removed at some excel version, so now its more of a hassle for me to get to it. Is this customization possible? In the macro recorder, it comes out as .Color = 10092543. Now, it will occasionally show up for a while under "recent colors" but then that will go away after a while.
View 1 Replies
View Related
Jun 29, 2007
I have a spreadsheet that has differen color rows for certain data. Is it possible to sort a spreadsheet by row color instead of row header?
View 9 Replies
View Related
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
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
Aug 23, 2009
Can the backround color on a forms toolbar button be changed or must I use a control toolbar button if I want the button in color? I would prefer using the forms button and have tried customizing (tools/customize/forms) then right clicking on the forms button icon and selecting “Edit button image”, clicked on the desired color and clicked ok.
View 2 Replies
View Related
Mar 11, 2014
I've got a problem to write macro. I need users to color code background (manual not conditional formatting) depending of progress in projects. Then range L6:N10 will automatically return value (from range E5:I5) based on background color.
Users got very basic excel skills and their work will limit to manual background change.
I need something like INDEX MATCH based on colorindex.
View 2 Replies
View Related
Nov 9, 2011
I am using the following formula and getting a #NAME returned
I just need the count of the red background color cells.
Code:
=SUMPRODUCT(--(ExtCell("backgroundcolor",$E$2:$E$13,1)=3))
Where E2:E13 have the values and only the red background (=3) is needed. If the green and yellow background colors where needed what do I set the = to?
View 3 Replies
View Related
May 31, 2012
i trying to write a macro to add Yellow background color to all the data starting from row 2 in a specfic worksheet but the rows of data is always different it coulsbe from row 2 to 50 then the next day from row 2 to 100 etc.
Code:
Sub Macro2()
Range("A2").Select
Range("A2:O56").Select
With Selection.Interior
[Code].....
View 4 Replies
View Related