Find Average Of Different Columns And Colour Code It
Feb 27, 2014
I have the following code to go through various values in a column and colour code them. However I am facing two issues here:
1. I need to generalize the code such that it runs through column G till column S in different worksheets
2. Few columns between G and S do not have any data and the code is getting stuck at the line below:
myResult = WorksheetFunction.Average(Range("G:G"))
View 1 Replies
ADVERTISEMENT
Aug 21, 2012
I'm trying to develop code that will perform the function in the title. I want to use an if statement that looks at cells across the worksheet and where it finds certain text it should colour the entire row. I would also like to be able to input the text via a user box. I don't necessarily want the code
View 3 Replies
View Related
Apr 17, 2014
I have a lookup that gives and RGB colour code in Cell A1; for example 186, 206, 140.
I'd then like Cells R10:V15 to fill with the RGB colour based on the result in A1.
View 2 Replies
View Related
Aug 10, 2009
I have created a Sales Data spreadsheet which is updated by 10 members of our sales team. We also have a master sheet which gets updated the moment the individual sheets are updated by the sales team.
I want to know how I can differentiate the new entries with the old ones. Is there a code I can insert in the Master File which would change the colour of the new entries, say for example, all the rows with the date field “August” should automatically be changed to yellow. Similarly all “September” entries should automatically be coloured Red.
View 14 Replies
View Related
Aug 23, 2007
I have a really simple question - am tryingto print my VBA code, but want to print it as it appears in the VBA window, in colour (i.e. green comments, blue operations, etc). Is there a way to set it so the code prints in colour?
View 3 Replies
View Related
Jan 31, 2007
if we are finding some value in pivot table can it be possible that system will find it & colour the cell
View 9 Replies
View Related
Sep 25, 2009
Is there a way to automatically conditionally format each column in each row, when either open, closed or cancelled is selecting from a drop down in the Status column. For example every cell is blank in colour, but if I select open in the drop down menu for row A2, the entire row will turn Red. Just wondered if there is a way instead of individually formatting every row separately. I would like to be able to copy the formula or whatever down the entire sheet.
View 2 Replies
View Related
Aug 14, 2009
I humbly seek help on the "Find and Add based on Font Colour". For instance, A1="urgent"(with red font) and I want B1 to return as "ATTENTION". Other than red font, it will return as empty string. Can Conditional Formatting do the task?
View 9 Replies
View Related
Feb 10, 2009
I've had a look through the forum and can't see an answer, so apologies if I'm duplicating something!
I have a spreadsheet where column O has five conditions:
1 PO in
2 High Probability
3 Medium Probability
4 Low Probability
Blank
I need to colour code the whole row based on the value in the cells; if there were four conditions, I could do this with conditional formatting, but with five (with white as the fifth condition), I need to look at VBA.
However, I'm having difficulty colouring the whole row; how do I do this?
e.g. what I need to do is:
If O2 = "1 PO in"; Select A2:T2; Colour green
In addition, I need to ensure that if there is no data in column D, but column O is "1 PO in", it is highlighted in a separate colour. I have a macro for that, but don't know whether in needs to be put into the code before or after the macro needed above...
View 9 Replies
View Related
Apr 11, 2014
I have recently inherited a spreadsheet where information is tracked by using various background colours on cells for different meanings.
In order to clean up the data and make it usable I need to find the 1st cell in each row without the fill
Is there a way in Excel to display the first cell in a row which is not blank andwhich doesn't have a background fill applied?
View 5 Replies
View Related
Aug 4, 2009
I have a workbook that has 1800 sheets, some have a grey (VBA colour 15)filled cell somewhere in column A (varying no.s of rows) that I want to keep. Some have no filled cells at all in column A and I want to delete the sheet.
View 9 Replies
View Related
Apr 1, 2013
I want to change the back ground colour of each row until G column when there is a text in the first cell. I have attached the excel that I want the background colour to be. Like suppose, F1 is the details of family 1, F2 is for family 2. I want each family to be coloured. The rows are not fixed for each family. If F1 details are coloured green, Fr is orange, F3 is green and F4 is orange again. And the number F1, F2, F3, F4 and so on are not ordered in ascending. They can be random. But I want the colour coding to be the same as what I have shown in the excel. I have so many rows like that. How do I do that using excel. I have tried conditional formatting. But it doesn't work.
View 2 Replies
View Related
Apr 13, 2013
I have a sheet (calender month) with week number in the top row, date on the second and weekday on the thirdh.
Is there some code that will change the background colour of the entire column when the weekday say's sa or su (saturday/sunday)?
I could do it manually but every year the first of januari starts on a different day and I would like to automate it.
View 9 Replies
View Related
Mar 13, 2014
I have made several Shapes and assigned macros to them, all is good.
What i am curious about: is it possible to highlight or change colour of the shape on press and return to normal if another is shape is pressed? Just anything to make that particular shape stand out that it has been selected then return to normal when another shape has been selected...
[Code] ....
That is the code so far that is attached to 1x shape...
View 5 Replies
View Related
May 25, 2013
I have a large list of students (Col a,b) who do several sports (up to 10) each, which are arranged as sport name (Col c) followed by score (col d), repeated on pairs of columns for the other 9 sports.
I need a macro to find the 4 highest scoring sports for each student in turn and to highlight the score and sport cells. I have tried to find permutations using the LARGE function but I cannot see how I can do this.
View 5 Replies
View Related
Apr 26, 2014
i am trying to complete a spreadsheet which most of it is done but one column i have i have to average everyother square in each column which i did but when i total those columns at the end i get the dreaded #div/01 which means any value that i dont have in a particular column it will not add is there anyway to fix this. i am attaching a sample of the spreadsheet so you can see exactly what i am trying to do .
View 6 Replies
View Related
Sep 8, 2008
Really need a formula for a traffic light system
ie
if 3 colums have entries no
4 Maybee
5 yes
and it highlight it in green amber or yellow
View 11 Replies
View Related
Jun 11, 2014
I have developed the following code to colour cells dependent on reference to adjacent criteria (in Col D).
Is there anyway I can simplify this code to avoid three separate "For each" statements?
Code:
For Each c In Range("E12", Range("e" & lastrow))
If c = "" And c.Offset(, -1) "" Then
c.Interior.ColorIndex = 7
[Code] ..........
View 2 Replies
View Related
Mar 2, 2012
I have a peice of code that i know is inefficient and it is in danger of becoming too large. I have a spreadsheet that has circles aligned to each cell. There are around 100 in total. The code changes the colour of the shape based on the cell value in which it sits. However, the code needs changing and also it does not automatically update the colour shape even though the cell value changes. I have to manually select a cell and then the formula bar and then press return for it to update.
I am using excel 2010.
This is the code i am using for each shape.
Code:
If Range("n12").Value = text Then
ActiveSheet.Shapes("Oval 250").Fill.ForeColor.RGB = RGB(255, 255, 255)
End If
[Code]....
View 6 Replies
View Related
Jun 13, 2014
I am working on a spreadsheet for work, and have managed to do everything I need to so far but I need to colour specific letter strings, certain colours within a range of cells (each letter string will only appear once on each sheet)
The strings I will be looking for vary depending on data entered so I will need to cell reference them
The strings that need colouring are in cells with other strings that must stay black (They cannot be separated from other strings due to the nature of the grid)
I need some strings red, some green, and some blue.
These changes should also apply to the whole workbook not just one sheet.
Is there a way to do this with the VBA code.
View 3 Replies
View Related
Sep 20, 2009
I'm working with Excel 2003 and I desperately need the AVERAGEIF function. Can you give a user defined function for AVERAGEIF.
View 9 Replies
View Related
Oct 12, 2012
I have a list of items that are made up of numerous components.
Sales are not set against components, just the item itself. Yet the stock is set against the components and not the item they make up.
Some components appear in more than one item.
What I need is to add the average sales of all components that have the same item number, and then divide the Stock by this total average.
I don't know how to attach a worksheet as I can't install any of the screen shot programs at work.
Picture :
note that this is not the entire list - there are som components that appear in over 100 items.
View 9 Replies
View Related
May 2, 2007
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rng As Range
Set rng = ActiveCell.CurrentRegion
Application.StatusBar = _
"Current SUM is: " & _
Application.WorksheetFunction.Sum(rng) & " " & _
"Current AVERAGE is: " & _
Application.WorksheetFunction.Average(rng)
End Sub
I now have the following problems:
I get a errot when i select cells with no number
Run-time error 1004
Unable to get Average property of the WorksheetFunction class
The sum and average stay in the status bar.
The code gets confused after i selected different columns.
I would like the code to work only when i select a range of cells.
Is it possible to move the text in the status bar more to the right?
View 9 Replies
View Related
Oct 3, 2012
I would like it to loop through all the charts on the "Graphs" sheet.
It works well but gives a "Run-time error '1004'" Application-defined or object-defined error afterward that I would like to get rid off.
VB:
Sub Colour_Chart_working()
Dim rngColors As Range
Dim rngCell As Range
[Code].....
View 1 Replies
View Related
Feb 13, 2014
Is it possible to search Excel by cell colour, i.e. font colour...and then change the said colour to another one?
View 3 Replies
View Related
May 25, 2008
I have 3 excel sheets (A,B and C) linked to a master sheet (X). In each sheet (A,B and C), people enter unique idetifier in first column, its type (mr, ab, J) in the second column, start date in the third column and finish date in the fourth column. At the end of every week, i subtract each start date from the finish date and get the number of days spent for each unique idetifier (column N). I preiously posted a thread (Calculate difference between dates excluding weekends) to inquire about how to calculate the difference between finish date and start date and exclude the weekends. I received some nice solutions, but none has worked as the start date cane be weekend as well.
My second and major query is once i have the difference in weekedays for each unique identifier in all the three sheets, I want to calcuate the average of each identifier type (mr, ab and J) in the master sheet. In the master sheet, i have used sumproduct to calculate the average of each idetifier type from column N for each sheet. That means i have a column for A sheet, subdivided into three types, which include the average. I am using sumproduct for this. Once this is done for each sheet type, i need a final colum in the master sheet that calculates average of all mr from A, B and C together, and similarly for ab and J. The problem here is if i combine all the sumproduct formula, i am not gettng the right answer.
My formula looks like SUMPRODUCT((SheetA!$E$5:$E$40="mr")*(SheetA!$M$5:$M$40)) for all mr in sheet A. I then divide this by SUMPRODUCT((SheetA!$E$5:$E$40="mr")*(SheetA!$M$5:$M$40<>"")) to get the average of all mrs in sheet A. I do the same for sheet B and sheet C for all three identifier types. Now i want to combine the formula for all sheets together under mr, Ab and J. I thought the following should work ((SUMPRODUCT((SheetA!$E$5:$E$40="mr")*(SheetA!$M$5:$M$40))+(SUMPRODUCT((SheetB!$E$5:$E$40="mr")*(She etB!$M$5:$M$40))+(SUMPRODUCT((SheetC!$E$5:$E$40="mr")*(SheetC!$M$5:$M$40)))/((SUMPRODUCT((SheetA!$E$5:$E$40="mr")*(SheetA!$M$5:$M$40<>""))+((SUMPRODUCT((SheetB!$E$5:$E$40="mr") *(SheetB!$M$5:$M$40<>""))+((SUMPRODUCT((SheetC!$E$5:$E$40="mr")*(SheetC!$M$5:$M$40<>""))).....
But this is giving me wrong value. It is working fine when done for individual sheets, but when combined for all three sheets together, the value is wrong.
View 9 Replies
View Related
Oct 4, 2008
Column B: The day of the week that the date is, Sunday, Monday, etc.
Column C: Every date in 2008
Column D: my data (the number to be averaged)
What I need the formula to do:
Look in Column B for every instance of "Sunday", and count them up (they count only if the data in column D is not 0) and use that number to average the number in column D
So if I have 52 Sundays and we are only 4 weeks into the year and the 4 data points are 50, 100, 75, 25. The average will be 62.5 instead of 4.8 (divided by 52).
View 6 Replies
View Related
Nov 27, 2008
I am trying to figure out how to take the average of the last 4 "non-zero" numbers in a series of values.
The sheet looks something like this, numbers are all in one row:
7 , 7 , 7 , 7 , Total = 28 , 8 , 8 , 8 , 8 , Total = 32 , 0 , 0 , 0 , 0 , Total = 0 , 8 , 8 , 8 , 8 , Total = 32 , 7 , 7 , 7 , 7 , Total = 28 , 8 , 8 , 8 , 8 , Total = 32 , 0 , 0 , 0 , 0 , Total = 0 , 8 , 8 , 8 , 8 , Total = 32
I'm looking for a formula that will look at all the last few totals (starting from the end) and take an average of the last 4 totals that were > 0. In this case it would average {32, 32, 28, 32} ignoring the 0 total.
View 7 Replies
View Related
Jul 27, 2009
Attached Dummy file. I would like to be able to get the average time spent on a process for the day recorded on the "Results" tab. I have posted the answers it should be on the Results tab, which was done manually. I would like the file to do it on it's own. On the individual's tab, the time and instances will be recorded for each job. I believe I am close, and the only thing I need is the Results page to be able to return the desired results. Ranges varies day-to-day, and I think (maybe), I can figure out the dynamic range settings.
I would like to avoid creating a helper column for each set, because then I would be dependent on the person expanding on this. I am also avoiding Pivot Tables, I understand it, but not the ones that needs it. This will have about 15 tabs for employees, and could be possible that more or less will happen, depending on workload. This will continue to be manual for now.
View 5 Replies
View Related
Jun 2, 2009
I have a total in F16 that i need to find an average of.
The range is set from f4 - f15 (12 months) and need to find the running average per month. but as we only have done 5 months of the year so far that is the only average required (F16/5).
I need this to count at the end of june (F16/6) basically not counting any zero months (jul, aug, sept etc until the end of each)
View 5 Replies
View Related