Formatting With Calculated Values
Jun 23, 2009
Column 2 is a calculated value (a sum of several other columns). I cannot get the code to work. When I enter the same value in the field it works, but not when it is a calulated value.
I know there must be a simple error in here somewhere...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 2 Then
Select Case Target.Value
Case Is > 382: Target.Offset(0, 0).Interior.ColorIndex = 3: Target.Offset(0, 0).Font.ColorIndex = 2
Case Is > 315: Target.Offset(0, 0).Interior.ColorIndex = 30: Target.Offset(0, 0).Font.ColorIndex = 2
View 9 Replies
ADVERTISEMENT
Aug 16, 2006
I use pivot tables extensively in my job. I have several spreadsheets that feed from acess database tables to build pivot tables. Besides the fields imported from Acess, I also create calculated fields. The problem is, for both the calculated fields and the imported fields, the number formatting does not stick. I know how to go to field settings, then to number, and change the customized format. The problem is, once I take that field out of the pivot table and bring another one with a different format (say, bring a field with currency format and take away one field with a percentage format) and then bring the original field back to the privot table, the number format is gone.
This is really annoying since I work with dozens of fields, and it takes time to change the number settings every time I change fields on the pivot table, and the number of decimal places, etc. I stress that I know how to change the number formatting on fields, it's just that it excel does not remember it afterwards.
I thought that maybe the formulas in excel might allow one to include the formating, but I have not been able to find if this is possible, and if so, how to do it. So, for example, the following formula for a calculated field:
=IF(ISERROR(Contribution/'Block Hours'), "0", (Contribution/'Block Hours'))
would be nice if the formula itself could include the number formating. I tried including something like , 0.00% at the end, but it does not work.
View 4 Replies
View Related
Mar 7, 2007
I've got a sample spreadsheet that I'm trying to get the MAX from a Range of cells that only begin with "TMP". Problem is, if I use MAX or SUM to try to calculate the largest number (or a sum, just to test), it returns "0" for the caluculated range. If I Copy and Paste Values, the MAX or SUM formulas still don't work.
Only if I edit the cell and hit the ENTER key will the Formula(s) work, for each cell in the range that I edit/ENTER. All cells are formatted the same (GENERAL), and I'm not working it into a VBA Macro (just yet).
View 4 Replies
View Related
Apr 19, 2006
I have made spreadsheet that calculates my total cost of making ice cream mix based on ingredient costs of two variables (Van_Gal, and Choc_Gal), for example 550 gallons and 750 gallons respectively. The worksheet calculates the total cost of making the Vanilla Gallons and the Chocolate Gallons. I’m not a VBA or Macro wiz, and now I’d like to Make a macro that will allow me to make a “table” of calculated costs associated with different assumed Vani_Gal and Choc_Gal amounts and then print the values; and then go down a row and print the cost of another amount of Vani_Gal and Choc_Gals until some preset end has been reached. For example:
Van_Gal; Choc_Gal;TOTOutput;avg cost
550; 750; 1300; $4,000.00; $3.08
600; 700; 1300; $4,250.00; $3.27
Let’s say that I want to know what the tot cost and avg cost per gallon for various combinations of Vanilla and Chocolate Mix from 550 V and 750 Choc for various combos and have it increase in iterations of 10 Gallons (i.e. 560 Van and 740 Choc); Maybe I'd use a " loop" that repeats calculations and prints them for different combinations of Van/choc until 800 Gals Van and 500 gal Choc. Once I have a table of values, I could sort it and find an optimal production level (with the Minimum avg cost). how to make a macro that can crank out a table like this?
View 4 Replies
View Related
Oct 2, 2007
i have a list which is populated with data from another sheet.. if there is no data in the corresponding cell on the other sheet then the cell is blank.. i've tried using:
=OFFSET($Z$2,0,0,MATCH(REPT("z",255),$Z:$Z))
but it doesn't see the blank cells as blank i.e. no data in them as they contain formula's.. (even although there are no values populated) - can anyone offer any help in relation to this???
View 9 Replies
View Related
Jul 28, 2014
I would like to restore the currency format including the $ and three decimal point commas.
=MIN('2Data'!E2:E500)&(" - ")&MAX('2Data'!E2:E500)
View 4 Replies
View Related
Jan 20, 2010
Im using access 2003 and the conditional formatting is only limited to 3. But i wanted 5. I was told it can be done using VBA. But I've got no programming experience whatsover.
Basically this is what i want, but i dont know how to translate this VB
IF Cell Value = >1 then make the value "Bold", "Bordered", and "Fill" with Orange colour.
IF Cell Value = "H" then make the text "Bold", Bordered, and "Fill" with Green colour.
IF Cell Value = "S" then make the text "Bold", Bordered, and "Fill" with Yellow colour
IF Cell Value = "A" then make the text "Bold", Bordered, and "Fill" with Blue colour
IF Cell Value = "U" then make the text "Bold", Bordered, and "Fill" with Red Colour
View 9 Replies
View Related
Oct 10, 2012
I want to copy the values of a cell with the formatting. ok, this is easy with paste special and keeping formatting.
What I wanna do is ... lets say the value is 400 , applying (special) formatting to cell the value becomes 500400. When I copy the value I want to copy all the number and not just the 400 but the whole number 500400 as one wthout the need to apply format to the destination.
View 9 Replies
View Related
Jul 10, 2014
Some of my numeric values are with single decimals .....
Eg:
1542.2
9856.5
659855.9
2589.7
When I format in Excel with Number with 2 decimals my results remain the same
But the result which is need is:
1542.20
9856.50
659855.90
2589.70
View 4 Replies
View Related
Jan 10, 2009
I am having a very difficult time trying to figure out a conditional formatting formula for something that seems very simple. There are 3 conditions I would like to apply to cell B2: If the value of I2 is less than or equal to 24, but greater than or equal to 21, shade B2 red. If the value of I2 is less than or equal to 20, but greater than or equal to 12, shade B2 orange. If the value of I2 is less than or equal to 11, but greater than or equal to 8, shade B2 yellow. I am sure I am missing something quite simple here.
View 5 Replies
View Related
Feb 12, 2009
Can Conditional Formatting be set on multiple values? I cannot get this to work with any formula, the cell values are not between two values. For example: for value = D or R, or X change color to green. (I would have another condition within a range F to Q)
View 4 Replies
View Related
Jan 14, 2010
For use in conditional formatting, how do you check three values are identical?
=exact doesn't work, x=y=z doesn't work.
View 2 Replies
View Related
Jan 26, 2014
Using conditional formatting to make all the cells that contain numbers and are formatted to percentage format make display in red color? let's say I want to set this conditional formatting rule initially after just opening the excel book and afterwards when I type in values/text etc. into the cells I want the cells where I have input numbers and chose the percentage format to come out in red color? and all the rest stay in black color?
View 6 Replies
View Related
Jan 20, 2010
In a proceedure I'm trying to copy some ranges including: text,cellcolor and borders to a number of different places. What I've got from modifying the macro recorder was
View 2 Replies
View Related
Apr 5, 2012
I have , for example, 3 values (1, 2 and 3) in column D which is 10,000 rows long.
Is there a formula that will colour part of each row (say C1 - F1) in a different colour each time where there is a match to value 1, 2 or 3?
View 9 Replies
View Related
Sep 27, 2012
I need a conditional format that highlights duplicate values in different color. For example 221 and 133 are duplicate values in a range, but I want them to not show only in red. I want duplicate values in the range to show in an individual color.
I have an idea of running a macro that counts all the duplicates, paste them in a separate sheet where only the duplicated values will show, then have a regular conditional format of "Equal to".
View 5 Replies
View Related
Feb 1, 2013
I have a set of values on Sheet1. These 'original' values will never change.
I then have a set of values on Sheet2. The 'updated' values get updated every month.
On Sheet3 I want to show the updated values again, pretty much a copy of Sheet2, but where a value is higher than that on Sheet1 or lower than a value on Sheet1 I want to use conditional formatting to show this.
Is there a simple way to use conditional formatting in such a way? I have a long list of values so don't want to individually create a rule for each cell.
View 6 Replies
View Related
Mar 11, 2008
I have a spreadsheet where my dropdown menu is taken from a master list. The master list is also broken down into several catagory specific lists.
I need a macro that will take the individual cells in the worksheet that use the master drop down list, check them against the contents of the specific lists (defined names) and assign a cell color fill based on wich list the data was found in.
lets say my master list is:
MASTERLIST
apple
orange
bananna
lemon
pork chop
sirloin
chicken wings
carrot
potato
onion
sage
thyme.............
View 9 Replies
View Related
Sep 22, 2008
I have 3 values in C3, D3 & E3 which need to be all the same at all times but when they are not I'd like to highlight the one that isn't with a background colour.
View 9 Replies
View Related
Jan 12, 2010
I currently copy/paste sports data from the web into MS Excel. One of the columns pasted contains "Won-Loss", which appears as '1-0' on the web. However, once the data is pasted, Excel identifies this field as a date and changes the value of '1-0' to 'Jan-'00. I would like to insert a new column and convert the field back to text (i.e. Jan-00 to 1-0). I have attempted several formulas, however no luck as of yet.
View 9 Replies
View Related
Feb 2, 2010
Is there a way to do the following using conditional formatting?
I need to have all duplicates highlighted.
For example (Since "Ana M." is the first) highlight both rows (or at least the group of "Ana M." cells in the column, entire row not necessary)
Highlight:
Ana M. 12 A St 333-3333
Ana M. 23 Z St 333-3333
Skip:
Jane S. 12 A St 555-5555
Jane S. 15 Z St 555-5555
Highligt:
Sam A. 55 A St 222-2222
Skip:
Tony J. 45 A St 444-4444
Tony J. 11 B St 444-4444
Tony J. 66 Z St 444-4444
View 9 Replies
View Related
Mar 28, 2014
I have a spreadsheet using Conditional Formatting to colour cells. Is it possible to hide the cell value so only the colour is shown?
View 2 Replies
View Related
Jun 4, 2009
How would you copy a row's formatting and formulas but not value. for example: A1 1 B1 =a1+2
I would like the copied row to be: A2 (blank) B2 =A2+2
View 6 Replies
View Related
Aug 27, 2009
In Excel 2007, is it possible to copy & paste a pivot table, and have the result look like a pivot table, but not actually be a pivot table? I want to keep the values and the formatting (the colors and borders, etc) but I want it to not actually be linked to the data or have the ability to change with dropdowns, etc. I've tried the usual copy & paste special (values) thing, and the other otions in the paste special box, but it doesn't keep the formatting.
View 10 Replies
View Related
Dec 9, 2009
I would like to know if there is an efficient way to save an excel workbook, with multiple worksheets as an .xls. I want the file to keep the formatting from the original file, while only saving the values of the original file. All the numbers in the original file are hyperion driven but the file is going to be emailed to people without hyperion. Is this possible?
View 6 Replies
View Related
Dec 14, 2009
I need to find rows in my large worksheet that have 2 vendor names for a single vendor ID. Each vendor should only have 1 vendor ID.
Is there a way to highlight rows that have a single vendor ID for more than 1 vendor name?
View 9 Replies
View Related
Sep 21, 2013
I want to do conditional formatting based on two cell values.
i want to do conditional format the column 'R' based on clolumns 'J' and 'R'.
column 'J' is a text column named PRIORITY which can hold the values P1,P2,P3 an P4.
Column 'R' is nothing but difference of two columns 'M' and 'H'(both are time stamps).Column'R' is in below format.
=TEXT(M4-H4,"h:mm:ss").
column M and H are in below format:
eg: 9/11/13 9:41 AM
Now i want to format the column'R' like
if column J ="P2" and column 'R' > "00:10:00"(10 mins) =it should become red.
if column J="P3" and column 'R'>"00:30:00"(30 mins) = it should become red.
View 7 Replies
View Related
Oct 26, 2009
I have two date columns, say E & F. In these two columns I have entered date values. I need to do colour, font bold, Italic automatically when date values are entered in these columns - with a conditional formatting - i.e. every month should be in different color.
For example, values 23/05/2009, 15/10/2005, 07/12/2004 must be automatically coloured with different colors as its months are different.
View 2 Replies
View Related
Mar 9, 2009
scenario: Column H needs to be formatted to green if the text in Column F does not equal "Dog". Dog could be either DOG, Dog or dog. I know how to get it done with only dog, but this one is a bit tricky.
View 2 Replies
View Related
Feb 21, 2012
I enter data in Cells starting at C3:O13 I enter 4 digit numbers 1131, 1212, 1122, 1215, 1201, 1207, 1133 etc. etc.
Here is my rule: I cannot have more than 8 numbers in the 1200 series in ROW 3 So I need conditional formatting to come up with a yellow background if I have 8 numbers in the 1200 series.
Example:
C3, C4, C5 etc.etc. 1131, 1212, 1122, 1215, 1201, 1207, 1214, 1233, 1122, 1230, 1216, 1122
1216 would highlight because it was the 8th cell in that row that contains a number in the 1200 series.
View 4 Replies
View Related