Macro To Generate Message Box Based On Colour Of Cells On A Sheet

Mar 29, 2007

I have built conditional formatting into some cells on ' Sheet 1' and would like a message box (saying "Check errors before closing") to appear when the user tries to close the workbook if any of these cells are coloured red (ColourIndex 3).

View 3 Replies


ADVERTISEMENT

Excel 2003 :: Macro That Will Generate A List Based On Cells Value

Mar 6, 2012

I have a workbook that has 30 tabs in it. Each tab is a report card for students. What I'd like to do is create another tab with a button on it that when I hit the button it will search through each tabs range of D12:D40, D48:D76, D84:D112, D120:D136, J12:J40, J48:J76, J84:J112, and J120:J136. And if any of these cells has an MS in them then this new sheet I have created will list each students name which is in cell E5 and list what they recieved the MS for. This will be in the same row number but in column B. So if cell D12 has an MS in it then this report will list the students name and what's in cell B12.

Windows XP
Excel 2003

View 3 Replies View Related

Display Cell Data In Message Box Based On Colour

Apr 8, 2008

I wonder if the following is possible in the worksheet_open event. I want to be able to open my worksheet and see via a message box all the important features I need to look at.

Using column AG,
Take the cells that are conditionally formatted to red, take the corresponding cells in column A & B and output this
information in a message box.

View 9 Replies View Related

VBA Code To Colour Certain Cells Based On RGB Colour Shown In Cell A1

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

Generate Numbers From Another Sheet Based Multiple Conditions

Nov 21, 2007

I am trying to generate a number based on the Month, Year and then three digits. For Example: 1107-001. I would need it to refer to another sheet for the previous used last three digits. Each month it would start over at 001. On the Reference sheet it would always be in the first column.

View 9 Replies View Related

Automatically Generate Template Sheet Based On Previous Data

Apr 17, 2014

I currently have a large spreadsheet that multiple people fill out. Each person fills out all the information in a row. At the end of the row, I would like a button that says "Generate Form" so that when clicked, a new sheet automatically opens with a template form that I created and is already filled out with the information that was just inputted into the spreadsheet. Also, there are four different template forms that could generate. For example, there are forms A, B, C and D. If the user inputs "B" into the first column of the row, then when he goes to click "Generate Form", a new sheet is created with all the information filled out in Form B.

View 3 Replies View Related

Generate A Message Prompt

May 20, 2008

I am currently using the below to generate a message prompt. I have two questions that require assistance.

1. How can I furthur tweak it to show the value contains in the cell that correspond to the date?

For example in cell A2 contains date value; Cell B2 is the order number.

If the date in A2 matches today's date, the message prompt should carry Cell B2's value instead of B2 that is displayed as of below code.

2. Can I set the prompt date to be like 15 days after today's date?

Example: Today is 05/01. There will be a prompt if the date in cell A2 is 05/16.

Private Sub Workbook_Open()
Dim r As Range, ff As String, msg As String
With Sheets("Test")
Set r = .Columns(1).Find(Date, , xlFormulas, xlWhole)
If Not r Is Nothing Then
ff = r.Address
Do
msg = msg & vbLf & r.Address(0, 0)
Set r = .Columns(1).FindNext(r)
Loop Until ff = r.Address
End If
End With
MsgBox IIf(Len(msg), "Matches Found:" & msg, "No match found")
End Sub

View 9 Replies View Related

Copying Cell Contents From One Sheet To Another Based On Colour

Jun 17, 2008

I have a workbook called "Staff Planner". I need to check Columns C to I in Sheet "Plan" to firstly find text in a red font, and then copy this value to Sheet "Useage" in Column K. (So, search C1:I1, find red font, copy contents of cell, paste value to K1). I then need to repeat this with blue font/value to H1, green font/value to E1, and finally pink font/value to B1

View 9 Replies View Related

Excel 2003 :: Generate Outlook Message?

Sep 16, 2013

We have an Office issues spreadsheet where our staff post questions/issues they have. These items are then allocated to a member of staff to look into and resolve. Each issue is entered on a seperate row on the spreadsheet, with the issue in column C, the allocated persons initials in column H, their e-mail address in column I (pulled in from a look-up table based on their initials), and the response required date in J.

I would like the spreadsheet to automatically send an e-mail when the issue is allocated to a person, or is re-allocated to someone else, ie when the 'allocated to' cell changes.

The e-mail message would only need to inform them that an issue on "column C text" in "filename" has been allocated to them and that a response is required by "column J date". We use Excel and Outlook 2003.

View 1 Replies View Related

Colour A Range Of Cells Based On Two Dates

Sep 27, 2009

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.

View 6 Replies View Related

Colour Range Of Cells Based On Input Of Name

Feb 6, 2013

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.

View 9 Replies View Related

Colour Range Of Cells In A Row Based On Value Of One Cell

Mar 21, 2008

I would like to change cells A2 to G2 to a different colour based on the value of G2

(0 to 48) Dark Green
(-2) Light Green
(-4) Yellow
(-6 to -48) Red

The range of the sheet would be A2 - G130. Each Row would change on value of cells in Column G.

View 9 Replies View Related

Auto Generate A Comment Box Based On A Cell Value That Has Variable Reference Cells

Jan 30, 2010

I have been given the following code and it works great. I now need to adapt it to the following scenario: In the attached sheet, the user has to select either, "Suburban" or "Squad" in row 5. If the user selects, "Suburban" I need this script to compare the values they enter in a given row to the value in column "B".
If the user selects, "Squad" I need this script to compare the values they enter in a given row to the value in column "C".

Look at row 48, for example. If the user enters, "Suburban" in cell D5 then the value they enter in cell D48 should equal "1". If it does not equal "1" then it should proceed with the adding of a comment. Conversely, if the user enters, "Squad" in cell D5 then the value the enter in cell D48 should equal "2". If it does not equal "2" then it should proceed with the adding of a comment.

View 5 Replies View Related

Adding Cells Based On Shade / Text Colour

Jul 4, 2007

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

View 9 Replies View Related

Macro To Generate A Line Graph With Coloured Pointers And Lables Based On Table

Sep 30, 2009

column A = Date : 01/02, 07/02, 14/02, 21/02, 28/02 (x-axis : shows when the table is updated)
column B = project: x, x, x, x, ,x (name of the project and trend line)
column C = Delivery Date : 01/05/2009, 08/05/2009, 20/05/2009, 30/05/2009, 28/02/2009 (plotted on the graph)
column D = Status : Green, Amber, Red, Green, Blue (status of the project. the points should be the same colour as is described in the table)
column E = Comments: original, delay, supply, out of money, on track, delivered-wow! (these comments will pop up if the user holds the cursor over a point)

NB Y-axis scale : 01/01/2009 to 31/12/2009 with increments of 14 days. this will be the same scale used for all projects.

Date Project Delivery Date Status Comments
01/02 x 01/05/2009 Green original date
07/02 x 08/05/2009 Amber delay supply
14/02 x 20/05/2009 Red out of money
21/02 x 30/05/2009 Green on track
28/02 x 28/02/2009 Blue delivered-wow

So id like the macro to draw the line for project x based on the 'delivery date'. The points should be coloured according to the 'status' column and when you hover the mouse over the point the data lable will show up taking info from the 'comments' column.

Would it be possible to create a macro that will be able to generate this graph automatically. I have a few projects id like to do the same thing for.

View 14 Replies View Related

Changing Fill Colour Of 2 Other Cells Based On Another Cell Outcome

May 29, 2014

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

[File attached]

View 8 Replies View Related

Changing Fill Colour Of Cells Based On Other Cell Inputs

Jun 20, 2014

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:

=IF(AND(Q6>=D9,Q6<=E9),OR(IF(C9="Planned","P",""),IF(C9="In Progress","IP",""),IF(C9="Late","L",""),IF(C9="Complete","C","")),"")

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.

View 1 Replies View Related

Conditional Formatting To Colour One Cell Based On Text From Range Of Cells?

Oct 22, 2013

what i would like to do is change the fill colour of D68 if the word Air appears with in D5:D65?

View 6 Replies View Related

Search Excel For Cells With Numbers Of Certain Colour And Changing Said Colour

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

If Macro Is Disabled: Place A Message On The Sheet Saying This Will Only Work With Macros Enabled

Aug 17, 2006

When you enable macros the sheets 2, 3, 4 ect are visible but if you disable macros, you only see sheet 1 and and you can place a message on the sheet saying this will only work with macros enabled.

View 2 Replies View Related

Changeing A Cells Colour Basing On Other Cells Colour

Mar 23, 2009

i want a cell to change to the colour green if 5 other cells on the page are green colour.

I want a cell to change colour to red if there are 1 or more red cells on the page.

How do I make this work?

View 8 Replies View Related

Hyperlink Cell To Filter That Cell Value Based On Colour Filters Used In Another Sheet?

Aug 5, 2013

I have a table which says that this is the amount of coloured cells we have in another sheet.

For e.g.

Field Name Code A
Item Description 5

Now, the item description column has 5 cells in another sheet which are filled in with "Yellow" Colour. So what i want to do is to click on this 5 in sheet 2 in this case as per the attached sample which takes me to the filtered result on sheet1 of 5 yellow coloured cells under the column of Item description including an additional filter of Code "A"

View 1 Replies View Related

Colour 7 Cells In A Row And Then Switch Colour?

Jul 17, 2014

So I have a macro that colors the selected cells in a certain color. Now im looking for a code that will switch that color every 7th cell, the cells will only be selected horizontally. For example:

if the selected range is 10 cells, 7 of them should be in one color and 3 of the should be in another. But if the selected range is 15 cells the first 7 should have one color and the next 7 should have another and then the last one should have the first color again, and so on..

View 6 Replies View Related

Comparing Two Cells Based On Text, Font, Colour, Font Size Etc

Jun 3, 2006

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.

View 9 Replies View Related

Colour Cell Based On Few Conditions / Cell Values Of Other Cells In Same Row?

Jun 28, 2014

In the xls for each step I have 2 raws-planned and actual. Step planned duration is populated manually over the weeks.Before that row we have another reflecting the actual step status per week

I would like to find a way how cell reflecting the actual status of a step can be automatically populated (coulored) based on the colour/value of activities that are planned for that week and for that step.Activities are listed below the step and again have planned and actual row.

The rule should be : if for a week we have several activities all of them should be finished in order to have step stataus auto populated as green. If a single activity planned for that week is not done-then weekly step status should be red.

The activities for each step are grouped below the step. It seems that one of the difficult part in that request would be how formula will understand where starts and finishes the activities that belong to one step. To get that happen I placed a column showing step and another column where we activity.

View 9 Replies View Related

Generate A Report On Second Sheet From A Filtered Values From The First Sheet

Nov 28, 2013

The table on Sheet 1 is being used a record system for history of each lifting equipment we mobilized to our client for rental. The Door No. (Column A) is a name for each equipment. The Date Mobilized is the date when equipment left our premises and started working on site and Date Demobilized is the date when equipment went back to our yard.

To explain my requirement, refer to the first 7 rows indicates that the Door No. ATC0005. It was mobilized 7 times but demobilized 6 times. Meaning that the equipment is currently deployed because the last mobilization dated 01-Jul-13 doesnt have an corresponding data of Demobilization. My first requirement is to have a filter where in it will show the list of currently mobilized equipment. In that case I just go to Date Demobilized and filter it by only showing the blanks.

My second requirement is to know how to filter to only show the available equipment. I was able to analyze it this way: For example we take a look at the history of FLD0001, it has 5 Mobilization Date and 5 Demobilization Date. So i need to know a function to filter a Door No. that has the same number of Mobilization Date and Demobilization Date. My first solution is to just filter the Date Demobilized to not show blanks hence it will show all equipment that has the same number of Date Mob. and Date Demob. But my exact requirement is to have a real time report on a separate sheet (refer to Sheet 2).

Sheet 2 is report for equipment status. Under Equipment (Column A) are the list of equipment. Using the data available on Sheet 1, the cells under Client (Column B) should be filled up either "Available" or "Deployed".

Lastly, for all Deployed equipment only the Client Name should also be retrieved on the report on Sheet 2.

filter values.xlsx

View 14 Replies View Related

Cells Colour Equal To Another Cells Colour

Jul 19, 2012

I want a cell to be equal to another cell including the colour, conditional formatting as the colour will have no relevance to the cell value i.e. the colour will be set manually dependant on what stage of the lifecycle it is at

The original cell may have a date and be yellow and I want the target cell to be yellow with the same date, if someone then changes the original cell to be red the target cell should automatically change to Red

Is there an easy way to do this or do I need some VB script?

View 2 Replies View Related

Autohide Cells In Sheet 2 And 3 Based On Sheet 1 Cells That Are Hidden

Feb 12, 2014

Need to autohide cells in sheet 2 and 3 based on sheet 1 cells that are hidden. (Example if i hide 150 switchgear on SOV tab it will hide 150 switchgear in Customer and Foreman sheets as well).

View 1 Replies View Related

Highlight Cells In Sheet 1 Based On Cells Existing In Sheet 2

Jul 11, 2013

I have a sheet (sheet1) of around 900 rows with data in columns A-K. Column B contains a unique value.

Sheet2 contains data which needs to be highlighted in sheet1 and each row in identified by a unique value in Column B.

sheet1.PNG
sheet2.png

In sheet 1, I only want to highlight the cell which exists in sheet 2 for the matching reference number in column B. For example, in sheet2, the value 'PM328491CN' exists and the value 'CN' is present in cell c2. I want the cell that contains this value in sheet 1 to be highlighted (cell C6).

So, find the matching reference, the highlight the cell in the row which is present in both sheets.

View 1 Replies View Related

Macro To Pull Data From Multiple Sheet To Main Sheet Based On Column Headings

Sep 13, 2012

I need a Macro which pulls the data from different sheets of excel (which is not formatted properly) to Main Sheet. Also some of the columns will not have the same names, so macro should handle this exception as well.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved