Create A Multi Condition IF Statement
Mar 26, 2009
I am attempting to create a multi condition IF statement for work. Essentially what we have is a column dedicated to the date in which a piece of equipment is supposed to go into service.
What we want to do is make it so that if the current date is 40 days past the scheduled in service date, a status column displays the term "Verify".
Additionally, if the scheduled in service date is 365 days from the current day, a status column should display the term "Future".
If it is any day in between the two, it should display the term "Active"
I have two seperate lines of code, one that covers verify and active and the other that covers future and active but I can't combine the two so that I have one function. The code I compiled is included below, any help would be appreciated.
=IF(D7=0,"Active", IF((TODAY()-40)-D7>0,"Verify","Active"))
=IF(D8=0,"Active", IF((TODAY()+365)-D8<0,"Future","Active"))
(D# corresponds to the respective cell that contains the scheduled ISD)
View 13 Replies
ADVERTISEMENT
Aug 13, 2009
I would like to try and achive a conditional format that will require a lookup function. when the condition is met it places Yes or No into a cell and changes that row colour to red for the NO condition. and after 10 days from now the rowcolour is removed.
View 6 Replies
View Related
Jan 22, 2007
I am trying to sum the error points of staff in their work done based on a specific time frame. For example,from 4.00pm to 4.30 pm as per the attached. I tried sum product but did not work. Is there an addition formula that I need to use when incorporating time ?
View 6 Replies
View Related
Apr 14, 2008
Is there a way to have a sumif formula dependent on two conditions?
View 9 Replies
View Related
Sep 24, 2009
I have three columns of data
Col-A-----Col-B------Col-C
1---------(blank)-----a
3---------A----------b
1---------A----------b
2---------B----------c
2---------(blank)-----c
4---------D----------a
3---------E----------a
1---------A----------b
3---------B----------c
I am trying to calculate two things:
first, a simple count of entries (non-blank) in Col-B corresponding to 'a' in col-C. Ex. for Col-C='c', the no of entries in Col-B is 2. Here I was trying SUMPRODUCT(--(Col-B range""),--(Col-C range="a")) with CTRL+SHIFT+ENTER. It doesn't work.
second, a more complex count without repetitions. Ex. for Col-C='b' and Col-B='A', the no of entries in Col-A is 1, because there are two 1's. If there would have been three 2's and four 3's the count would be just 2.
View 9 Replies
View Related
Feb 6, 2007
I am working on a formula that has just gotten beyond me. This is what I want it to do:
If:
=IF(K9<I9,
Then:
IF((I9-H9+T8+U8)>=180,(180-T8-U8-(K9-J9)),(I9-H9)),IF((K9-J9)+(I9-H9)>=180,IF((K9-J9)>=180,0,180-(K9-J9+T8+U8)),
Else:
IF(I9-H9)>=(180-T8-U8-(K9-J9),(180-T8-U8-(I9-H9),(I9-H9))
This is what I currently have, but it's not working:
=IF(K9<I9,IF((I9-H9+T8+U8)>=180,(180-T8-U8-(K9-J9)),(I9-H9)),IF((K9-J9)+(I9-H9)>=180,IF((K9-J9)>=180,0,180-(K9-J9+T8+U8))),IF(I9-H9)>=(180-T8-U8-(K9-J9), (180-T8-U8-(I9-H9),(I9-H9))))
View 8 Replies
View Related
Oct 25, 2006
i tried to compare 2 different cells with text inside.Each cell contains "yes","no"," ", 6 possible values
For example
A B C
1 YES NO
2 YES YES
3 YES " "
4 NO YES
5 NO NO
6 NO " "
In column C, i want to enter the result f.e. if a1="yes" and b1="yes" do 1,if a2="yes" and b2="no" do 2 and so on There is a function for this?
View 6 Replies
View Related
Oct 21, 2013
So, Excel reads my formula. It tells me it's correct, but it has too many statements. [I know this is true, because the equation is absolutely huge. )
The thing is, I need it to tell me, based on two separate columns - one being "State" and the other being "A vs. O", who this contact belongs to. [For each state, there is a different person for A and for O, and the entire spreadsheet is text.]
My ridiculously large, almost functional function is:
=IF(AND(RC[9]="WA",RC[13]="APP"),"Kyle Johnson"),IF(AND(RC[9]="WA",RC[13]="OPP"),"Tom Wieske"),IF(AND(RC[9]="MT",RC[13]="APP"),"Kyle Johnson"),IF(AND(RC[9]="MT",RC[13]="OPP"),"Tom Wieske"),IF(AND(RC[9]="ID",RC[13]="APP"),"Kyle Johnson"),IF(AND(RC[9]="ID",RC[13]="OPP"),"Tom Wieske"),IF(AND(RC[9]="OR",RC[13]="APP"),"Kyle Johnson"),IF(AND(RC[9]="OR",RC[13]="OPP"),"Tom Wieske"),IF(AND(RC[9]="CA",RC[13]="APP"),"Tom Wieske"),IF(AND(RC[9]="CA",RC[13]="OPP"),"Tony
[Code] ....
As you can clearly see, there are a lot of terms, but I need both the "State" and the "A vs. O" column to determine the outcome of the column the formula will be in.
View 3 Replies
View Related
Dec 11, 2007
I consider myself a beginning intermediate Excel user and am really learning a lot through this forum but have not run accross the answer to what I'm trying to achieve. I would like to return the value in the "Temp" column that meets all the conditions of the columns "letter", "day", and "time." Specifically, the "Temp" of "A", "Weekday", "East." I have attached a small spreadsheet. It seems Vlookup is the approach to use in combination with multiple if conditions or an array. But I am not yet comfortable with such a complex equation. Can someone provide me with some guidance or an equation that would work. So far this is how I've been learning. Looking at equations and deciphering how they are written.
View 5 Replies
View Related
Aug 24, 2009
Currently for the first line on the sheet I'm working with, I have the following:
=INDEX(SALESMEN!$D$2:$D$500,MATCH(TRUE,SALESMEN!$H$2:$H$500<>"X",0))
which is completed with CTRL+SHIFT+ENTER, and it works properly. However, I want to do the same for all lines following, where it will go to the next item matching that value. For instance: on my SALESMEN sheet, I have John Smith, Fred Johnson, and Mary Williams. Fred Johnson is considered inactive, which is represented in the SALESMEN sheet as an "X" in column H. Therefore, I want line 1 to show John Smith, and line 2 to show Mary Williams.
View 9 Replies
View Related
Sep 13, 2006
I am trying to figure a way -- preferably in a single- cell formula -- to calculate a conditional volume-weighted average of a series of associated prices and quantities located in two separate columns based on the date (or dates) the transactions occurred.
I can do a simple Vol. Weighted Average (VWA) of all the prices and quantities over the five-day period with the following formula: (I have created named ranges for the price column (A1:A30=price), the quantity column (B1:B30=quantity) and the date column (C1:C30=date):
= SUMPRODUCT(price, quantity)/SUM(quantity)...
View 9 Replies
View Related
May 18, 2009
Please refer to attached Sinking Fund worksheet. have managed to solve most of it. Just need to figure out how to match the periods out. My requirements are on the worksheet.
1. To get the schedule on sheet 1 to stop calculating further once it has reached the actual number of payment periods as shown in H12.
2. To get the interest calculation in sheet2 to stop once the actual number of payment periods as shown in sheet1 H12 is reached.
View 3 Replies
View Related
Oct 28, 2009
Rows:
Each row contains a new client (a new entry)
Columns:Clients first and last name.
Case number
Case type - Case type can be AAA, BBB, CCC, DDD, EEE, (and many more).
Case outcome - Case outcome can be Granted (G) or Denied (D)
A case can be of type AAA, and be Granted.
A case can be of type MMM, and be Denied.
A case can be of type ZZZ, and be Denied.
Etc...
I am trying to keep track of how many cases of each type have been granted and denied. If you look at the file i attached, you will see that the table is a list of clients, with different case types and different outcomes to their cases.
The problem i am having is that i need a way to have a two-condition statement as such:
if case type is "AAA" and case outcome is "G", then add 1 to a "AAA GRANTED" column on another sheet.,....................
View 3 Replies
View Related
Jun 27, 2006
I have a problem with a SUMIF statement. I think it is =SUMIF(AND(...
I have attached I want to sum in column E lines 255-316 if in cell D 34 and if cell B25 equals GL and cell C255 equals 0001.
Maybe this would be handled better with a sumproduct formula...
View 3 Replies
View Related
Nov 20, 2006
I'm having a problem with negative values. Somehow if the pitchX is -11.1877, let's say, and it is the right value, the code will still perform the 2nd if statement, when it should not. Am I using the wrong data type? Or is there anything I'm missing out?
Dim pitchX As Double
If pitchX > 10000 Then
pitchX = pitchX / 1000
End If
If pitchX <> Range("C8").Value Then
With Range("C8")
.Font.Bold = True
End With
End If
View 6 Replies
View Related
Nov 17, 2009
=IF(SUM(Q4)=0,"",MAX(0,G4-MAX(F4,Q4))/7) - to calculate number of days for year
=IF(SUM(TODAY()>G4),(G4-MAX(F4,Q4))/7,SUM(TODAY()-MAX(F4,Q4))/7) - to calculate number of days year to date
I am using this condition to calculate the length of a service which falls with in a specific review period, eg
Service starts 1 Feb 09 and finishes 30 April 09
The review period is 1 Mar 09 and finishes 31 May 09.
I would need to measure the number of days that fall within the review period, which would be 1 Mar 09 - 30 April 09
At the moment I am missing a condition which identifies whether to subtract from 'service end date' or 'review end date'.
View 6 Replies
View Related
Sep 25, 2013
I have simplified my problem to its basic parts:
Column A Contains Customer Numbers,
Column B Contains a Balance.
Customers can appear more than once, but the data is sorted by customer number.
In column C, I need to put a 1 when the balance reaches 0 or less, but only for the first instance. Everything else should be 0.
here is how i'd want it to look:
customer
Balance
1st
View 9 Replies
View Related
May 6, 2014
I am running a macro which filters a column to show only records with "#N/A" (ie an error), and copies these to another worksheet. As I am aiming for no errors, there will be occasions when there is no filtered data.
My problem is that, unless I use something like xlCellTypeVisible, when there is no data shown it still copies and pastes all the hidden records. And if I do use it when no filtered data, I currently get an error "No cells were found".
I have tried many iterations of code correction and i think i'm currently blinded by staring at it so long!
My current if statement reads as follows:
[Code] .....
I think I might need to use some sort of On Error Resume Next statement, but I have never used these before. When I tried adding that before the If statement, it just ignored the criteria and tried copying hidden rows - the exact opposite of what I want.
I'd like something that said, if this condition = error, skip over entire if statement and carry on with rest of the sub.
View 5 Replies
View Related
Oct 6, 2011
I am using the formula below to count the occurences of relevant text strings (names) in a cell that can contain many separate strings. It works great. "References!$F$2:$F$34" contains my list of names and the formula returns how many occurences there are in each cell.
What i'd like to do know is work in a date criteria. Each name has an associated relevant date attached to it as does each cell that I am looking for these names in.
So...in english what Id like to do is alter my formula so that when it finds a text string that exists in "References!$F$2:$F$34", it then compares the associated date in "References!$G$2:$G$34" with the date associated with N3 which happens to be O3.
SUMPRODUCT(COUNTIF(N3,"*"&References!$F$2:$F$34&"*"))
View 5 Replies
View Related
Apr 10, 2012
I am trying to pull certain members loads from our global design force spreadsheet and because of the naming convention we used for our structural members the 2nd to last character is unique to what I am looking for. I am trying to get a simple condition statement that will display the load only if the 2nd to last character of the name of the element is satisfied.
For Example, if "T" is what I am looking for then :
EDT4 will be true and give me the value accordingly
D10T1 Will also be true and return me the value
D10B2 Will not be true
I know how to use the Mid() and right() function, but I need to check the 2nd from the right.
View 2 Replies
View Related
Feb 22, 2009
I have created a spreadsheet which creates an average of feedback for trainers in a training company. The form adds up the feedback score into column L of the summary sheet and I have created a summary sheet which I want you use to calculate the average for each trainer.
I have cobbled together an array formula which creates the overallaverage for each trainer based on the named ranges entered via the form.
It looks something like this:
View 10 Replies
View Related
Jun 15, 2009
I have an Excel file with multiple worksheets. 4 of these worksheets have the same format and have concatenate formulas in cells D14 through D28. What I need is an automatic pop-up message to tell me when I open the file if on any of these 4 worksheets text is generated from the concatenate formula that matches either "air cooling unit", "air heating unit", or "ceiling".
And, if so, I need for the pop-up to state the name of the Worksheet/tab and which of the above text strings match. For example, if one tab is named "6-5-09 C" and within the range of D14:D28 the text "ceiling" is listed, the pop-up should read something like, "Maintenance Needed for ceiling on 6-5-09 C!" If there are multiples on multiple worksheets, then I'd want all of them listed on the same pop-up. Then I would want to be able to click OK or CLOSE to close the pop-up. If I can even color the pop-up a color different than the regular gray, that'd be cool too.
View 2 Replies
View Related
Aug 8, 2014
Attached is a small sample which displays what I am trying to achieve - I am trying to create an if statement for cell J2 which says:
IF F2 = 1 then "R", IF F2 = 0 but there is a 1 in either H2, I2, J2 then "W" and IF F2:I2 are all 0's "N"
I Have manually typed the desired output in col J
I Have manually typed the desired output in col J
Attached File : IFFF.xlsx
View 6 Replies
View Related
Jun 30, 2014
I have a listbox with 8 columns. Multiselect is enabled, and it must stay this way. As part of my program, after the user presses a command button, I need to use the row indexes of the selected rows in order to copy the selected information into an array which is then placed in a different listbox, and then delete the items from the original list. Pseudocode of what I want to do:
[Code] .....
But my understanding is that .ListIndex does not work this way with multiselect listboxes. I've tried searching for a solution for a while, but I cannot find one.
View 5 Replies
View Related
Aug 21, 2014
I have a list of product numbers and product prices (table 1).
I have a list of those (old) product numbers becoming new ones (table 2).
BUT some of those products have been merged together so multiple old product numbers have become one new one.
Now I have a list of the new product numbers and I want to calculate the price of the new product by adding up the price of the old products.
View 4 Replies
View Related
Jun 3, 2007
I have a test sheet thus :
+ABCDEFG
1Bob11234
2Sally2
3Ann3
4Emily4
5Lexi3
6Bill2
7Josh1
8Jacob2
9Mary3
10Gary4
11
In D2:D11, I want a non-duplicate list of all the "1" names, i.e., Bob and Josh. In E2:E11, a list of all the "2" names (Sally, Bill & Jacob), and so on. Sorted would be nice, but not necessary. When new names and their numbers are added to A1:B200, they need to automatically show up in D2:G:201 as appropriate. I've looked over VLOOKUP, INDEX, MATCH, etc., but all seem to simply return the first and not every match. Maybe I'm just missing it.
Is this possible without VBA? Not that I have any objection to it, but delving into and learning it is a little outside the available time I have now. If it takes VBA I'll address it when I can free up some time.
View 5 Replies
View Related
Jun 2, 2008
if it's possible to create a statement from cells in a workbook perhaps by using the hyperlink option or if there is any other alternative way.
In brief, the statement should recognise what has been inserted into each cell in the row and then generate a statement.
I hope this is clear. See attached a copy of the excel sheet from which I would like to create the statement.
View 9 Replies
View Related
Jul 29, 2014
I almost get my eyes killed whenever at the end of the month
Statement
A
B
C
D
[Code].....
I have issued invoices with reimbursements to Mr. A so on 30th of the month, I issue a statement to summarize my invoices and reimbursements as above example. Note : An invoice and a reimbursement are always in a file(sheet1 and sheet2) and a solo reimbursement is a file(sheet1). "Invoice"(Folder) in drive D contains Invoice00100(SI11) & Reim00111(SE55).
Samples of invoice and reimbursement
Invoice(sheet1)
A
B
C
D
E
[Code]....
Solo reimbursement is the same as above reimbursement table
code that can extract all excel file in "invoice" folder and auto create as my first above table. I would like to manual select the files which are taken to extract to the statement.
View 1 Replies
View Related
Apr 5, 2014
I am working on a schedule worksheet, the days are the columns and the staff member names go down the rows. I want to create a new cell value based on a condition on each row. I have been successful working with one row but how to efficiently do the same for each row.? I'm working with Excel 2010.
View 9 Replies
View Related
Nov 5, 2008
I want to accomplish something like this but slightly different:
[url]
I have the same issue but a bit more complex. In my case I have an additional amount of columns (let's say dimensions). So for the example given (sales per month) I would add two columns for 4 different regions and 5 machine types (just examples).
The output (that would serve as pivot tabel input) would then have to be a 4 x 5 x 12 x 4 = 960 row database table.
I have tried to accomplish it by customizing the given code but that provedto be beyond my powers ;o)
and some 3rd party software [url]and [url] but non of them is doing what I'm looking for.
The code I'm looking for ideally would count the number of columns and unique records per column and construct the database table from that. So I am looking for flexibility in the number of dimensions also...
View 6 Replies
View Related