Excel 2007 :: VBA Message Box With Criteria

Dec 13, 2013

I have a spreadsheet that monitors employees rest periods between shifts across a number of weeks I've started writing a very basic piece of code so if the employee has less than 12 hours rest, a message box will appear with a warning:

So far this is what I've done:

Sub RestHours()
If Range("I7") < #12:00:00 PM# Then
MsgBox "Candidate has had less than 12 hours rest since last shift worked. Please find another candidate to work this shift", vbOKOnly, "Unable to Use Candidate!"

Now this does work if I run the macro and then enter the data into cell I7, however I'm now stumped - How can I make it so that this message box pops up automatically when the data is entered into the cell without me have to go in and run the macro?

I also need the macro to run all the way down the I column (I7:I100) and across other columns which will eventually contain the same data i.e. M7:M100, Q7:Q100, all the way across to AT7:AT100?

View 9 Replies


ADVERTISEMENT

Excel 2007 :: Pop Up Message When Data Is Entered

Dec 19, 2013

2007 Excel spreadsheet. My company currently shares ONE spreadsheet to generate new project numbers (Shown below). My issue is once a new number is assigned, it is supposed to be entered into our accounting software but that doesn't appear to be happening in some cases.

Is there a way that a pop up message can appear when column G is populated (Entered by)? Something like, "please be sure to enter this XYZ".

View 9 Replies View Related

Excel 2007 :: Adding Feedback Message Based On Cell Value?

Jan 9, 2012

Using Excel from Office 2007, and WinXP Pro OS

I have a spreadsheet which contains 2 drop down pick lists in Field1 and Field2.

Code:
FIELD1 | FIELD2 | FIELD3
--------------------------------------------
In Cell A2, I have this set in Data > Data Validation:

Allow: List
Source: =CatList

If the user selects a value from the CatList range, then the drop-down options in Field2 are updated accordingly.

In Cell B2, I have this set in Data > Data Validation:

Allow: List
Source: =INDIRECT(A2)

The Ranges are as follows:

Code:
Cat1 | Cat2 | Cat3
---------------------------------------------
Cheese | Hat | Square
Trees | Cat | Circle
Bees | Sat | Triangle
Knees | Mat | Rectangle
Apologies | Bat | Octagon

I'd really like to be able to add a message into FIELD3, which is based on the value in Cat2

e.g. using pseudocode, something like:

If Field2 value = "Apologies" then put this message in Field3: "This requires approval from A"
elseif Field2 value = "Triangle" then put this message in Field3: "This requires approval from XYZ"
elseif Feidl2 value = "Bat" then put this message in Field3: "This does not require approval"

Basically this is for an access form, and I need to be able to add a feedback message to field3 based on what's in Field2.

I thought about using the INDIRECT option to add messages but I can't see how I'd do it. Maybe VB would do it, but I don't know it well enough.

View 3 Replies View Related

Excel 2007 :: Security Alert - Data Connection Message Every Time?

Dec 20, 2012

I open a spreadsheet or workbook that has links to other workbooks I am notified by the message bar that content has been blocked. I click Options > Enable this content > OK. Even if I don't make any changes I'm prompted to save changes when I close the file. If I hit Yes or if I hit No, I will still be prompted to enable content in the message bar the next time I open the same file.

I have changed the External Content settings in the Trust Center to "Enable all data connections (not recommended)" and "Enable automatic update for all workbook links (not recommended)" but I still get the messages.

My Message Bar is set to "Show the message bar in all applications when content is blocked" because I read on Microsoft KB that the other option of "never show information about blocked content" will still block the content, just not tell you about it, which doesn't fix my issue.

The files I'm opening and the files linked to and from them are all on the same shared drive on a file server in the office. Is there a way to tell Office '07 that our file drive is a trusted source by default?

View 2 Replies View Related

Excel 2007 :: Error In Creating Email Message In Body Text

Mar 16, 2014

I've set up an email to be sent via a macro (excel 2007 and outlook) and I expanded the body of the message and it now comes up with an error "Compile error: invalid outside procedure"

It was working when I only had 4 lines and now it's not working.

strbody = "Hi," & vbNewLine &_
"abc." & vbNewLine &_
"def." & vbNewLine & vbNewLine & _
"ghi" & InputBox("Enter Response date (dd/mm/yyyy)") & vbNewLine & vbNewLine & _
"jlk." & vbNewLine & vbNewLine & _
"lmn" & vbNewLine & vbNewLine & _
"ABC" & vbNewLine & vbNewLine & _
"XYZ" & vbNewLine & _

[code]....

View 3 Replies View Related

Excel 2007 :: Change Username In Mouseover Status Bar Message For Cell Comments?

May 30, 2012

I am having with Excel 2007.

When I hover the mouse over a cell with comments, the status bar displays a message; for example "Cell A12 commented by A satisfied Microsoft Office user".

I only get this message for one column. The cells in all other columns give my first and second name as the author of the cell comment.

Why it is only effecting one column. I have been unable to change the annoying "commented by A satisfied Microsoft Office user" to my own name.

Is there a macro that can do this? I tried two macros I found online, both from a few years back, but neither of them worked.

View 2 Replies View Related

Excel 2007 :: Multiple Value With Criteria

Oct 6, 2013

I have use excel 2007. In our sheet i have in cell "B3" product name i.e. "abc" , "xyz" etc. That is called sales of goods.

In cell "C3" i have number of quantity
If "B3" is "abc" then only calculate below :

1st option : If product name is "abc" then only calculate (which is cell "B3") & cell "c3" is >=15 & cell "c3" is<19 then message shown as "one mobile free"

2nd option : If product name is "abc" then only calculate (which is cell "B3") & cell "c3" is >=20 & cell "c3" is<39 then message shown as "two mobile free"

3rd option : If product name is "abc" then only calculate (which is cell "B3") & cell "c3" is >=40 then message shown as "three mobile free"

In view of the above which formula applicable.

View 4 Replies View Related

Excel 2007 :: VBA With If Search OR Criteria Copy

Apr 7, 2014

VBA to copy entire row in all worksheets in file based on criteria.

step1 Copy tab has criteria in cell c1

step2 search if this c1 value in each tab in column e or g or h

step3 check if column i is yes

then if criteria meet, copy entire row to copy sheet

I came across some similar posts in other forums which can do partial work but not entirely .

Note ; number of rows, columns and tabs varies in file

I am using excel 2007.

View 8 Replies View Related

Excel 2007 :: Extracting Criteria Into Another Worksheet?

Feb 15, 2012

Excel 2007. Is there a way to extract information from cells and rows that constantly move? These rows need to be able to cut & paste, copy & Paste, insert and delete. I have the formula I need to display the data, but with the cutting and pasting etc, my formulas get all messed up.

I have the excel sheet on Google docs. It displays some cells wrong because it does not recognize certain formulas.

[URL]

On the second worksheet, I want the information from columns A, H, M, N, and O to be extracted at a certain time each evening and sent to a worksheet, without sending duplicates. These rows will constantly move which is why my current setup, which is just to display the information, will not work... We decided to try to extract it into a different worksheet or workbook if possible.

View 1 Replies View Related

Excel 2007 :: Populating Data Based On Two Criteria?

Mar 28, 2014

I'm trying to populate a table based on two different criteria in a another table. On is based on a date and the other the number of a unit. I'm trying to get the data in sheets Week 1 and Week 2 into the format in sheet Example. Is there a way to create a series of functions, filters, etc that I could use to create a macro to do multiple sheets or at least a whole sheet at once? I've been trying to think through it with my limited knowledge of filters and functions

Here is the file with an example and I'm using Excel 2007: Example.xls

View 2 Replies View Related

Excel 2007 :: Find Out Maximum Date With Two Criteria

Aug 9, 2013

In excel 2007 i have three sheets.

In sheet1 : Cell : "D3" : I have find out & show maximum date with two criteria (i.e. code & series) from all sheets.

Also in cell : "E3 : I have find out maximum date with two criteria from particular one sheet only.

I have mentioned comments in attach file.

In sheet name 1112 & 1213 : I have a lot of data approx 40000.

Column A : Invoice no
Column B : Invoice date
Column C : Code
Column D : oano
Column E : Name
Column F : city
Column G : distric
Column H : Series

In yellow highlighted cell i required formula.

View 5 Replies View Related

Excel 2007 :: SUMIFS - How To Specify Criteria That Looks At Type Of Formula

Jul 31, 2012

I'm trying to sum over a range (column A) based on values in another range (column B). Column B's cell values are calculated with a simple numeric formula that is either a subtraction or an addition of two cell references. I want to sum all the column A cells for which the corresponding column B cells are determined by a subtraction. Then separately, sum the cells for which the corresponding column B cells hold an addition. It seems that SUMIFS is the function to use, but how do I specify the sum criteria as "a subtraction" or "an addition"?

Windows 7, Excel 2007

View 5 Replies View Related

Excel 2007 :: Calculate Total Value Depending On Certain Criteria

Jan 27, 2013

I use Windows Vista and Excel 2007.

So to cut to the chase :

On my spreadsheet, I have 6 main groups of columns, each one comprising 4 columns with their own automated calculations across the range.

Group 1: Cell H5, Cell I5, Cell J5, Cell K5
Group 2: Cell L5, Cell M5, Cell N5, Cell O5
Group 3: Cell P5, Cell Q5, Cell R5, Cell S5
Group 4: Cell T5, Cell U5, Cell V5, Cell W5
Group 5: Cell X5, Cell Y5, Cell Z5, Cell AA5
Group 6: Cell AB5, Cell AC5, Cell Ad5, Cell AE5

Then I have two columns following those: Col AG, Col AI

In each one of those two columns, I am trying to sum up a total value using The IF Function.

In Cell AG5 : the sum of the values of cells K5+O5+S5+W5+AA5+AE5,

ONLY IF the values of Cells H5, L5, P5, T5,X5, AB5 is equal to AG3 (which is a symbol (wingding 3 for capital P), this occurs 3 times out of 6, sometimes twice only, and at random, so I need the sum of 3 cells (or 2) out of 6, based on the above criteria.

Same in Cell AI5: sum of the values of cells K5+O5+S5+W5+AA5+AE5

ONLY IF the values of Cells H5, L5, P5, T5,X5, AB5 is equal to AI3 (which is a symbol (wingding 3 for capital L), this again occurs 3 times out of 6, sometimes twice and again at random, so again I need the sum of 3 cells (or 2) out of 6, based on the above criteria.

Using the formula: =IF(T5=AI3,(W5),0) , I retrieved the value of cell W5 into cell AI5; and when I tried the formula :

=IF(T5=AG3,(W5),0) , in cell AG5, it returned the value 0 which is correct again, as T5 was equal to AI3 but NOT to AG3.

But I cannot work out how to add all of the three values relating to each symbol, independently in each column, as they each occur randomly.

This is the way it looks in the spreadsheet:

Cell H5 Cell I5 Cell J5 Cell K5/ Cell L5 Cell M5 Cell N5 Cell O5/
Symbol (for P) Text Text Value /Symbol (for L) Text Text Value

And so on 4 more times across.

I could of course add it all manually for each line but I would rather have a formula to do it for me as all the other calculations are automated and/or conditionally formatted.

View 9 Replies View Related

Excel 2007 :: Using Sumproduct (or Alternative) For Hundreds Of Criteria?

Feb 13, 2013

I have a some data where I need to sum some data based on date range, and dept id's. But the dept ids are parts of various groups. For ex, one group covers about 300+ dept id's. Some of them have ranges (e.g. dept 1000 - 1050) but for whatever reason some dept id's that belong to other groups sometimes fall into the same ranges.

My first hope was one big range, but the overlap issue nixed that. As I mentioned there are some ranges so maybe 100 of them could be grouped into a range but I'd still have 200+ independent dept id's.

I read for 2003 the max criteria for sumproduct is 30 and for 2007+ it's 255. So maybe 2007 might cut it but this doesn't seem like the right way.

Btw, I'm doing this in VBA but I mention sumproduct because I've used it a few times within code via evaluate. Otherwise do I just have a massive string in vba (If deptid = #### or deptid = #### or deptid = #### etc)?

Again, it seems like there should be a better way. I thought about making a master list of all the dept's and sumproduct each one individually and then sum from the ones that fall under group but even then I have to identify the deptids I need for a particular group.

View 1 Replies View Related

Excel 2007 :: Returning Values Based On Criteria?

May 17, 2014

I'm using Excel 2007

I have the below data in sheet 1

In a separate column on sheet 2 i want to return the value of the data in ACC1 if the data in DEB/CRED is LC or SC and the value of the data in ACC2 if the data in DEB/CRED is SD

DEB/CRED
ACC1
ACC2

[code]....

View 7 Replies View Related

Excel 2007 :: Subtotals With HIDDEN Rows AND Columns Given Some Criteria

Aug 8, 2014

I am trying to develop a compliance report with Excel 2007) based upon a simple pass/fail criteria. The subtotals must be tracked both by Device (column) and by Requirement (row). There are macros (not included in the attached sample) that hides both columns and rows. I successfully found an example which I modified to correctly calculates data for a column when rows are hidden (see GOOD function below). However, I'm totally clueless on how to calculate data by row when columns are hidden (see BAD function below). What I'm trying to figure out is highlighted in red in the attached spreadsheet.

GOOD
=SUMPRODUCT(SUBTOTAL(103,OFFSET(B$2:B$5,ROW(B$2:B$5)-MIN(ROW(B$2:B$5)),,1))*(B$2:B$5="Pass"))

BAD (returns 0 and includes a circular reference)
=SUMPRODUCT(SUBTOTAL(103,OFFSET($B2:$F2,,COLUMN($B2:$F2)-MIN(COLUMN($B2:$F2)),1))*($B2:$F2="Pass"))

View 14 Replies View Related

Excel 2007 :: Search And Return Result With 2 Criteria In Different Sheet?

Nov 7, 2013

I use the following formula in excel 2007 (and it's working perfectly in 2007) but this formula does not work if I work with the same file in excel 2003 ...w why and what I have to adjust?

=IF(SUMPRODUCT(--(C5='sheet 2'!B:B);--(C13='sheet 2'!C:C);ROW(B:B))=0;"not found";INDEX('sheet 2'!D:D;SUMPRODUCT(--(C5='sheet 2'!B:B);--(C13='sheet 2'!C:C);ROW(B:B));1))

(I'm working with the dutch excel version so it might be that ";" must be ",")

View 6 Replies View Related

Excel 2007 :: Looping Through Text Strings And Copying Based On Criteria

Sep 17, 2012

I have 2 excel files, let's call them 1.xlsx and 2.xlsx (excel 2007)

File 1 is the file where I want data copied into and file 2 is the file I want to copy data from.

File 1 has certain text strings in every say 5th column in always row 2. I want to find those strings in file 2 and if the string is found, go 6 rows down, copy the cell, and paste it into file 1, 8 rows down the text string. this is the code I came up with, but it doesn't work

Code:
Option Explicit
Sub get_data_from_2()

Dim i As Long
Dim j As Long
Dim FinalColumn As Long
Dim RngFrom As Range

[Code] .......

the bolded part gives me an error.

View 3 Replies View Related

Excel 2007 :: Summing Column On Data Sheet Based On Multiple Criteria

Feb 23, 2012

Excel 2007. I have an Excel file that contains a data dump from an external database file with numerous analytical sheets that perform calculations. Some of these calculations utilize the SUMIFs function that was introduced in Excel 2007. This function does an outstanding job of summing a column on the data sheet based on multiple criteria.

However, someone high up in management in my organization would like to "drill down" into the data behind the

SUMIFs formulas to get a quick snapshot of the lines in the database that roll into the
SUMIFs formula. =SUMIFS(DataBase!E:E,Data!A:A,C7,DataBase!B:B,D7,DataBase!C:C,E7,DataBase!D:D,F7)

If I double click on a cell with the formula above, Excel takes me to the Database tab and selects Column E which is close, but not exactly what I need. What I really need is for Excel to only show the rows on the database sheet that make up the total in the SUMIFs formula and not the entire data dump from the database.

At present, we have to manually apply the autofilter on multiple columns to show the rows in column E that make up the total in the SUMIFs formula which is a tedious and time consuming task. Is there a way to force Excel to do this? Suggested custom database application or pivot tables, but we do not want to reinvent the wheel.

View 2 Replies View Related

Excel 2007 :: Create Dynamic And Unique Sublist Based On Multiple Criteria

Aug 26, 2012

Excel 2007, Windows 7.

Most details are shown in the spreadsheet below. I would like it to be dynamic because the quarterly and annual data dumps I'm working with are are hundreds to thousands of lines.

Have the list be sorted, which is a part of the first attempt, would be nice but is not necessary. At this point, just being able to generate the dynamic list would be fantastic.

Excel 2007ABCDE1product lines:consist of these product subtypes2Widget series:Widget.type1Widget.type23Fidget series:Fidget.type4Gidget series:Gidget.type1Gidget.type2Gidget.type356data dump of parts sold or used in repairs7product subtype repairedpart number

[code]......

View 5 Replies View Related

Turn Off Outlook 2007 Security Message

Sep 18, 2012

How to Turn off outlook 2007 security message to prompt me to press allow each time i send a message.

View 4 Replies View Related

Message Box That Returns Cell Value If A Criteria Met

Jun 12, 2014

I have the following code:

[Code] .....

This section:

[Code] ......

returns the cell that the date has passed in.

I would like it to return a different cell value in the message box, for example if J4 has passed its date, then B4 cell value is put in the message box instead.

View 3 Replies View Related

Display Message Based On Multiple Criteria?

Feb 10, 2014

I have created a sheet that calculates a score. Based on that score a determination is made to do one of three things - Nothing, Peer/Manager Review, Review Required.

In addition it was requested now that I make an overall decision for "Review Required" based on multiple triggers. My thought was to create a table from outputs of each element on another sheet, and then trigger off the table. What I am stuck on is using the multiple choices to trigger the message - Below are the choices of which each or a combination of each should trigger "Review Required"
Calculate Review Required

Total Score 'Review Required
Element 1 "
Element 2 "
Element 3"
Element 4"
Element 5"
Element 6"
Element 7"
Element 8"
Element 9"
Element 10"
Element 11"
Element 12"
Element 13 "
Element 14 '20 or more = reveiw
Element 15 '20 or more = reveiw
Element 16 '20 or more =review
Element 17 'Sum 20 Total of above if less than 20 in each

View 5 Replies View Related

Can A Message Box Be Brought Up In The Middle Of Code Asking For Criteria?

Jun 28, 2009

I have a worksheet with several columns (30+). One of these columns is "Date Opened". This "date opened" column can have dates as early as 01/01/89 and as recent as today.

Can a macro be made that does this

1. Data/Sorts the whole worksheet by the "Date opened" column
2. Brings up a message box in xx/xx/xxxx where format saying "Please enter the earliest date opened you would like to use, all other rows will be deleted"
3. Do just that, delete all rows that have a date earlier than the date entered in the message box.

So if the date of 01/01/2009 were entered into the message box, the macro would delete all dates in the "Date Opened" column that were older than that date.

And then, continue on with the rest of the sub, if neccessary.

View 12 Replies View Related

How To Automatically Say Yes To Excel Message

May 8, 2012

I am running a consolidation macro that keeps getting tripped up on a message box from excel. It is erroring out each time this box would normally pop up. It is not displaying the box, nor do I want it to. I just want it to not error by maybe invisible being set to 'yes' for this.

The message is due to data validation that is pointing to named ranges.

Message:

A formula or sheet you want to move or copy contains 'ThisName', which already exists in the destination worksheet. Do you wish to use this version of the name?

View 6 Replies View Related

Excel To Email PDF Error Message

Oct 18, 2013

I have an excel sheet that on the macro is saves and then sends a pdf via email. but outlook wants me to click to allow the application to send an email. Is there a way to bypass this?

View 6 Replies View Related

Excel Conditional Popup Message?

May 17, 2004

I have a worksheet with 3 cells in it. One cell is "Total", the second cell is "Adjustment" and the third cell is "Variance".

How can I create a popup message that states "Adjustment is Below the Total" and show the variance in the Variance cell in the event that the Adjustment value is below the Total value ?

View 9 Replies View Related

Auto Close Message Box On Start-up Excel

Apr 22, 2009

As an example, I have this code to open a message box saying "Hello" when Excel opens.

View 4 Replies View Related

Excel Workbook Activate - Message Box Popup

Mar 19, 2012

I am writing code in Excel VBA and trying to control power-point. at the end there is message-box pop up. Everything runs fine.

But at the end I have go bottom windows bar and click on the excel file then message box comes up, otherwise excel tag keeps blinking at the bottom. I want to add something to code so message box in excel file is pop-up automatically without me clicking on excel file.

View 1 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







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