Fill A Range Of Cells With A Colour And 'Merged' Text
Aug 12, 2006
I'm trying to create an excel spreadsheet to manage personnel and various ongoing projects, what I'm trying to do is create a custom box with a selection of options (5) that will automaticaly fill a selected range of cells with a colour and 'merged' text that was selected from the custom box.
My merged cells are not purely aesthetical - each merged cell (covering 6 rows in total, beginning at A3:A8) has colums and rows to the right for other details/formulae relating to that specific merged cell (which contains a customer account name).
The list I'm trying to reference is on a seperate tab - 'Projects' starting in cell A4. This list will have project names added to it, so I need my merged cells to reference the list, and subsequently pulling through all new additions to the list, rather than having to add them on a 2nd time.
I have been working on a spreadsheet but I use autoformat for.
For example if the date in the cell matches today's date then it turns the text read and makes it bold.
I was wondering if there was a way to format several cells in a row if a certain criteria was met.
for example
A B C 1 Item Cost Quantity 2 Car £11,520 2 3 Bike £7,500 1 4 Tyres £50 4
Now for example if I set a condition whereas the quatity is greater than 3 then it would highlight the whole row.
So in the example above I would like to to highlight row 4 and Fill colour cells A4,B4 & C4 with a yellow background and Red Text and make the texted bold.
I need to fill 2 other cells with varying colours dependant on what is chosen within another cell.
I have a drop-down list in cell A2 to select either ON SITE, ACTIVE or CANCEL.
What I need then basically is... if A2 equals 'ON SITE' then fill other two cells (A3 and B1) GREEN if A2 equals 'ACTIVE' then fill other two cells (A3 and B1) YELLOW if A2 equals 'CANCEL' then fill other two cells (A3 and B1) RED
I have a calendar set up with dates going along P6:CU6. Column C9:C27 has various status' for the job such as "Complete" or "In Progress" etc. Next to that in rows D and E I have start and end dates for the job. What I am trying to do is change the fill colour of the empty cells that are in line with each job, so that between the correct dates they are the corresponding colour to the status. So a complete job on row 9 that started on 26/05/14 and finished on 28/05/14 would have three green cells along Q9, R9, and S9.
I have tried an IF/AND/OR statement which looks like this:
I am getting a #VALUE! data type error, I have tried reformatting the cells to various date formats but no luck so far. This could be because my dates are set up as =P6+1 etc. but I am not sure. The error only occurs when the cell falls within the dates, otherwise it remains blank.
I intend to hide the value in the cell and use conditional formatting to change the cell colour based on the hidden input.
Once this is working I also need to take weekends into account, column G has any 2 value combination of Y and N to say whether the employee is working Saturday, Sunday or both. Row 7 has a "1" value underneath every Saturday and a "2" underneath every Sunday. I can imagine how this would work but combining it with the above formula could be complicated.
i have an excel file which contains data, I want to be able to search this file and to fill the cell and its next 3 cells to the right with a certain colour. Is this possible as I have wrote some vba to do this but, Im only able to search and not fill the cells with the correct colour.
I have several columns "A" thru "J" with simple contents, part#, qty, date, etc. and in column "K" descriptive text which can run several sentences long.
I'm trying to record a macro to insert a row, merge "A" thru "J" in that new row, cut the text from the "K" cell in the row above and select wrap text so it shows up below those headings so my user can read it.
Would look like:
I can get it to look like that if I grab the row borders and drag it to fit, but can I get it to increase row height and wrap to fit the text length automatically with the macro?
Code looks like this so far:
Keyboard Shortcut: Ctrl+Shift+M
Dialog box pops up "This operation will cause some merged cells to unmerge.
I'm going to have a shortcut key in the macro to do this one row at a time, as the data isn't that extensive, but I don't want to have to drag all the row heights.
I have merges cells starting at "AS18:CC18" and continuing through "AS616:CC617". I want to loop through each row from row 18 to row 617 and perform an action on the cell content (
code to loop through "AS18:CC18" to "AS616:CC617"?
I understand that the wrap text feature doesn't work if you are merging cells.
I have a document that users will be able to input certain cells but not others...the document needs to be protected so they can't change formulas etc.
I am using a staff schedule spreadsheet and have each column displaying text of where a staff person is assigned.
Instead of displaying the word "lunch" separately across several columns, is it possible to merge several columns and have the word "lunch" automatically stretched evenly across the several merged columns?
I dont want it to be centered but to literally be stretched to fit evenly across all of the merged cells.
I'm trying to add rows in range that has merged cells and unmerged cells combined
The number of rows that is already available before adding is dynamic so can be different each time
Set up is as following
columns A merged, B merged , C merged, D not : free rows , E merged again (merged start up is from 1-6 but as stated should become dynamic each time a row is added in column E
same set up is repeated from row 7-12 , etc....
so I i'm in block A (combo of merged colums and free rows in E ) one row should be added in colum E (E would then be 1-7 and be part of block A) same for the other "blocks".
I am using this code to hide or unhide rows of text on another sheet:
VB: Sub ProcessSheet1ChangeOnCellJ7(ByVal Target As Range)
Dim sAddress As String Dim sValue As String
'Get the address of the cell that changed without '$' signs sAddress = Target.Address(False, False)
[Code]....
When the "Not Pursuing" list box option is selected (in cell "J7" or "J8" in Sheet 1) I need to add (or over-write) "Not Pursuing" to the range of cells in column "B" (in the "Tasks" sheet), but only for that particular Goal, meaning a limited range of cells in column "B". If the "Pursuing - Show All Tasks" option is selected for a Goal then these same cells need to be blank so that the appropriate person can enter their name into the cell.
The purpose for adding "Not Pursuing" automatically to these yellow highlighted cells is that it will facilitate filtering of tasks by individual in the "Tasks" sheet..
Again I have tried several times to upload a sample file and am unable to, which I know makes it more difficult to solve. (Is there some common mistake people make? I know it's an allowed format and is very small in file size....)
Code solution can be entered directly beneath:
VB: If Target.Value = "Not Pursuing" Then ActiveWorkbook.Sheets("Tasks").Rows("29:29").EntireRow.Hidden = False ActiveWorkbook.Sheets("Tasks").Rows("30:48").EntireRow.Hidden = True
I have a spreadsheet where I can change the colour of a cell by clicking the mouse, I also have text in many of the cells.
What I need to do is protect (lock) the text so that no one can change the text in any of the cells, but I still want to be able to change the colour of the cells by clicking the mouse in that cell.
I have a spreadsheet where i would like to 'count' the number of cells with a particular colour AND SPECIFIC text (not 'any text').
I attach a xls with the initials of the person in column A, their colour as seen in cells in next four columns with the particular text in each cell. Therefore, for 'ABC1', in the given range, I would like to count how many cells have been allocated with the particular colour (brown, do not know colour index) and the particular text (1 or 2 or 4 or 5) in the range A1:CK39. Haven't supplied the actual sheet for confidentiality reasons.
I have a spreadsheet where I am adding up figures in columns.
I need to differentiate between 4 different "types" of cells to sum. Cells with figures in them are either green, red or have no fill; and some cells contain no figures at all.
At the bottom of the column, I need to total up all the figures in red cells, as well as all the figures in green cells.
The shading of these cells is not permanent - colours are changed as work progresses, so I need the totals to keep up with this.
If it cannot be done based on cell fill colour, is there any other way to do it, other than the usual long-winded way of @sum(..... etc
I am trying to get spreadsheet cells to change colour relating to arrival and departure dates. I also need the cells to be assigned value so I can use them to calculate cost based on number of nights, eg arrive Sept 10 dept Sept 15 = 5 nights. I can then use this 5 to multiply out costs.
I have attached an example of what I am trying to achieve.
I have searched the forum and saw similar questions but I couldnt apply them.
Trying to run a VBA to colour a range of cells based on the input of a name. I can write the basic level VBA to colour one cell by numerical input but struggling to see how this can be adapted to colour a range of cells and if instead of 1,2,3,4 etc the case could be replaced as text: eg Joe, John, Jason etc.
How to colour cells depending on text in other cells, for example,
I would like cells D26:AA26 to turn light red if the letters 'FSM' are in cell 'E26' even if other text appears in it, eg 'SA+/FSM' I have been playing about with conditional formatting but can seem to solve the mixed text issue?
Run-Time error '1004': Method 'Range' of object'_worksheet' failed
The Function basically takes any cell in range with a formula and has it blue. If the formula is overwritten by the user it turns the cells colour Red.
Private Sub Worksheet_Change(ByVal Target As Range)
'change Colour of cells from blue if formula based to red if data typed by user
If Not Intersect(Target, Range("AS63,BA5:BP66,BT7:CI55,BU60:BU64,BX60:BX64,CA60:CA64,CD60:CD64,BT55:CI66,BT59:CI59,CF7:CF55,CF65:CF66,DJ19:DJ21,DJ24,DL5:DM36,DJ41,DJ45,DJ48,DL41:DM48,DH50:DH51,DJ50:DJ51,DL50:DM53,DH63,DJ63,DL55:DM58,DL60:DM66,DU5:DV33,DU37:DV58,DZ8:EB8,ED5:EE27,ED31:EE66,EM5:EN12,EM16:EN29,EM33:EN38,DH63,AL5:AM26,AL30:AM49,AL53:AM66,AV5:AW16,AV20:AW29,AV33:AW53,AV55:AW63,CO5:CO66,CQ5:CR66,CY5:CY66,DA5:DB66,DJ5:DJ7,DJ14:DJ15,DJ17")) Is Nothing Then If Target.HasFormula Then Target.Font.ColorIndex = 11 Else Target.Font.ColorIndex = 3 End If End If End Sub
I have a worksheey of data and i would like the tab to be a certain colour dependant on the the contents of a range of cells within that worksheet is that possible. i know i need to use VBA and it cna be done based ont he contents of one cell.
So for example i have a sheet of people i am awaiting payment from, based on the last column " bill paid" i want the tab to be Red if there are any blanks in this column/ range and go green when all the cells in the column/ range are filled with "y"