Use Conditional Formatting To Change Font Size Based On Value Of Cell?
Jul 18, 2013
I am trying to set up conditional formatting in cell C4 to change the font to a smaller number based on the value of C4. If C4 = 0 then Font Calibri 16, otherwise Font Calibri 24. However, the font size is not availabe, it is greyed out. Is there another way to accomplish this without using VBA? In the worksheet could I use an if() statement to change the font size?
Via conditional formatting, I am searching to change the color of a specific word in a cell (not the color of everything in the cell, but only that specific word - and the word repeats in the cell). A function such as =isnumber(search("NOK";A1)) colors all the cell values, which I do not want to do. How i can perform this task?
I am creating a heat map using two variables from a questionnaire: firstly the number of people impacted by a question; and secondly, the level of the impact. Respondents are asked to give these values in two adjacent cells. These are then multiplied to give a weight eg 1000 people x level 3 impact = 3000. I have used Conditional Formatting to colour the cell according to the impact level (0 = none - white (default), 1 = moderate - tan, 2 = significant - orange, 3 = high - red). What I want to do is then change the font size to give an indication of the number of people impacted, eg 1 - 1000 font 8, 1001 - 3000 font 12, 3001 - 8000 font 16, 8000 - 2000 font 24 etc. The size of font and colour will then represent the number of respondents and their impact.
I can't use Conditional Formatting as the value of 3000 could be derived from 1000 people at level 3 (red), or 3000 people at level 1 (tan). Is there another way of setting the font size depending on the cell value, eg by VBA?
Cell B157 is changed by checkbox 1= TRUE, 0 = FALSE Cell H1 and Cell H2 are percentages changed by the user.
Range(AI8:AQ8,AI12:AQ12,AI16:AQ16,AI20:AQ20, etc) each cell in the range contains a formula, and is protected from the user.
I need the contents of each cell in the range to change font color (independent of each other) when the formula of any of the cells within the range changes - to the following
If B157 = 1
Cells < H1 (a percentage changed by user), would turn Red Cells > H1 but < H2 (a percentage changed by user) would turn Yellow Cells > H2 would be Green
If B157 = 0
Cells < H1 (a percentage changed by user), would turn Green Cells > H1 but < H2 (a percentage changed by user) would turn Yellow Cells > H2 would be Red
I need it to fire whenever the value of one of the cells in the range changes.
I have tried If statements, Select Case, and a combination of both but just can't get it!
Using conditional formatting I can change the font color (to blue) of a cell if it meets a certain criteria. Now what I would like is to display a message when the color changes to blue. The cell range is E26 to E40.
I have a simple sheet that has columns I-K. My issue is that in column K I am dividing J/I. If both J and I cells have a "0" then I get the #DIV0 error. If both J and I cells are blank then I get the #VALUE! error. I need it so that if the cells in J and I have a zero in them then it places a 0 in K. But if both J and I are blank then it puts something else that I can have Conditional formatting change the font color so column K looks blank. I think the IF formulas I am try to use recognize blank cells as zeros as well.
I'm looking to set up a spreadsheet whereby individuals answer questions and have to format their answer using a particular font, colour, font size and so on. The idea is that I can then compare their answer sheet to a pre completed one using an =IF function and get a total score. The only problem is =if and =exact only lookup cell text/numbers and don't look at how the text is formatted within them.
I have created a speadsheet for a tournament that lists the team names down column A (leaving a heading row). I have a formula in the top row which copies each row heading to a column heading 2 columns wide (to be able to record a result)
This way it will be possible to keep the results of the tournament on a grid. I would like to put in conditional formatting that meets 3 criteria...
1, it must fill every second row but only fill cells that have column and row headings (ie. rows that will have content in them which will be determined by the number of entrants). eg. if i have 10 teams then every odd row from row 1 to 11 will be filled. If 40 teams register then every odd row from 1 to 41 will be filled. 2, the fill needs to only fill cells that have column and row headings eg. if 10 teams register then every odd row from column 1 to 21 will be filled. Then 3, If the row heading and column heading are equal then it need to gray out or fill a different colour (or lock cell contents to empty if possible) but again, only fill cells that have column and row headings.
It needs to only fill cells that have a column and row heading which it doesn't, it fills the correct cells untill there is no column heading then fills every other cell in columns beyond the last column with a heading.
Rule 2: so far this works:
=AND(MOD(ROW(),2)>0)
but when i try to restrict it to cells with row and column headings it doesn't work. This is what I had:
=AND(MOD(ROW(),2)>0,IsEmpty(INDIRECT(ADDRESS(ROW(1),COLUMN()))"")=FALSE) OR =AND(MOD(ROW(),2)>0,CELL("contents""",ADDRESS(ROW(1),COLUMN())))
I have two conditions setup in Options>View - Zero Values.", "style="background: #FFFFFF;padding: 2px;font-size: 10px;width: 550px;"");' onmouseout='GAL_hidepopup();'>formatting.htm" target="_blank">conditional formatting. The first is setup for alternate row coloring with this formula inside Conditional Formatting:
Formula is = MOD(ROW(),2)
My Second Condition is
Cell Value is between $P$10 and $Q$10. This sets the font bold and a different color. The two cell values are two dates. I want to change the cells font color and bolding as long as the value is within that date range. It works fine, but for cells that are on the row that is colored the second condition doesn't apply for some reason.
I have two columns. In column B is the date of "last check". I column A is the date of "next check". I would like to have cell A2 in yellow color 334 days after the date entered in cell A3 and than in red color 365 days after the date entered in cell A3. Same thing for cell B2 related to date entered in cell B3. Yellow color in cells announces that check will expire within 30 days and red color that check has been expired.
I've created a combo box in excel with the macro recorder. This is the code that came back:
Sub test1() ActiveSheet.DropDowns.Add(1305, 52.5, 242.25, 39).Select With Selection .ListFillRange = "$AW$4:$AW$18" .LinkedCell = "$AX$5" .DropDownLines = 5 .Display3DShading = False End With End Sub
This always results in a default font size of 8 for my list. Can anyone tell me how to modify the code above to change the font size to 14? And how to modify the color of the list.
I use this ok code to increase the font in the selected cell:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim TargetRange As Range Dim isect Set TargetRange = Range("C:D") Set isect = Intersect(Target, TargetRange) If Not isect Is Nothing Then Columns("C:D").Font.Size = 11 Target.Font.Size = 15 Exit Sub End If Columns("C:D").Font.Size = 11 End Sub
The problem is when i press ctrl+c to copy a cell content, so once i move the curser to the distenation cell then the copying mode in selected cell disappeared. It is because when the event is trigered then the copying mode stops. The question is : how to let the copying mode works even when the event is trigered ?
I have this code as seen below that sends an email.
I would like to change the font size of - mymail.body=
How can I modify this existing code to achieve that.
Code:
Set myOlApp = CreateObject("Outlook.Application") Set mymail = myOlApp.CreateItem(olMailItem) mymail.Subject = strSubject mymail.Body = "WHAT DO YOU PUT INTO A BOX ?" mymail.Display mymail.ReadReceiptRequested = False mymail.attachments.Add "P:SR.xls" mymail.to = "email@email.com" mymail.Send
I have this macro that works perfectly. My boss wanted the subtotal lines within the report to be in a smaller font, so I added lines to the macro to do that. It won't work with those lines in there! It says the reference is not valid on the red line in the code below. The 2 blue sections are the ones I added to change the font size.
Code: 'Add subtotals at the end of each age bucket For i = 10 To LR Step 1 fr = Range("E" & i - 3).End(xlUp).Row If Range("B" & i).Value = "Totals" Then Range("E" & i).Formula = "=SUBTOTAL(9,E" & fr & ":E" & i - 2 & ")" With Range("E" & i & ":R" & i).FillRight
[code].....
Why would the font size make a difference? Is there some other way to change the font size that would work better?
Is it possible to write VBA code that will prevent a user from changing a cell's contents, depending on the cell's font color?
More specifically, I have a column of text in range B15:B64. Some of the cells will have a black font, others will be blue. Is it possible to lock the black font cells only, leaving the blue cells unlocked for users to change?
I have a workbook that includes a drop down list with three options. One of the options is "TA". The default font type for these cells is "Wingdings" but when "TA" is chosen I want the Font Type to change to "Arial".
Here, In April, July and August, there is a sharp increase (>10%), while in September and November, there is a steep decline (>10%). I would like to format the sharp increases as Green, while sharp declines as red.
Can I do it using conditional formatting?
I know I can attain this by creating a separate row for Month/Month growth in above example. But this example is a simplified version of my data. Real data is a lot more complex, and I need to do the formatting without creating any additional columns/rows.
I have a simple due date spread sheet for tasks that need completing at work. I am able to make the 'Due date' cell turn red when it is equal to or less than todays date, using conditional formatting. No problem.
I also have a 'Date closed' cell which is populated with a date when the task is complete.
What I am struggling to do however is change the red 'Due Date' cell to Grey once the 'Date Closed' cell is populated with a date. In fact I would like the whole row to be greyed out once the 'Date Closed' cell is populated.
I also have an 'Open / Closed' cell, which tells me if a task is open or closed, being chosen from a drop down I installed. Could this be used as an alternative to the 'Date Closed' cell. ie If someone selects 'Closed' in cell A4 the whole A row goes grey.
if a macro or private macro is necessary, I would need basic instruction how to use those as well (I mentioned private macro as I understand they automatically run whenever worksheet info is changed, which I would like in this example.)
I'm simply trying to change fonts in cells based on the inputs of other cells. Obviously, using conditional formatting doesn't allow for this.
For my example, assume the word "MrExcel" is in cells D2, F2, H2, J2, L2, N2, P2 and R2. If I type different font names (Times New Roman, Arial, Bookman, etc.) in the cells to the immediate right of each word "MrExcel," -- cells E2, G2, I2, K2, M2, O2, Q2 and S2 -- I would like the "MrExcel" word in each corresponding cell changed to the corresponding font to the right. I would like the ability to do this for up to 15 different fonts. There will be many rows to this worksheet I need to use this process for.
Is this possible? I'm in a bit of a jam and have exhausted my knowledge of formulas in that they won't work in this case ... I'm assuming I need to delve into the unknown land (to me) of macros, private macros, or VBA.