Multiple Conditions Within An IF-THEN Statement

Jan 13, 2009

I have the following formula entered into cell O4: =IF((AND($K4="1",$B4="1 - C",$I4="open")),(1),(0)). When the three conditions are met in the corresponding cells, I get a "0" returned in cell O4. I would like the formula to return a "1" when all three conditions are met.

View 2 Replies


ADVERTISEMENT

If Statement With Multiple Conditions

May 2, 2006

Dim b As Long
Dim last_rowB As Long
last_rowB = Range("K65536").End(xlUp).Row
For b = last_rowB To 2 Step -1
If Sheets("Main").Cells(b, 11).Value = Sheets("Main").Cells(b + 1, 11).Value & Sheets("Main").Cells(b, 11).Value <> "" Then
Sheets("Main").Cells(b + 1, 11).EntireRow.Delete
End If
Next b

If 2 cells are the same i want to delete the row of the 2nd cell, this works. But i dont want 2 delete cells that are blank, this doesnt work. For some reason it deletes everything in the table.

View 3 Replies View Related

Multiple If Statement: Value Returned In Cell C3 If Two Conditions Are Met

Aug 27, 2009

I am trying to have a value returned in cell C3 if two conditions are met. In Cell C3 (Sheet 1), if the value in Cell A3 (Sheet 1) is listed in column A on sheet 2, and the 12031 is listed in column B on sheet 2, I need the value of Open to be returned.

View 3 Replies View Related

Multiple Conditions For If Statement For Past And Future Dates

Feb 14, 2014

I need creating a formula that combines the following if statements in cell C107:

=IF(AND(B107

View 1 Replies View Related

IF Statement With List And Conditions

Oct 5, 2009

I am trying to create an IF statement that will double the unit value of a certain box (J15) if the number of I15 is less than or equal to 160 AND either "A,B,C, or D" is selected from a list in H15. If it does not qualify with both, it would just be the single value of J15, not doubled.

So far I can only get it to work with one item from the list in the IF statement:

=IF(AND(H15="A",I15<=160),J15*2,J15)

However, I don't know how to add in the other list options B-D and get it to work.

Basically I need these four statements combined into one:

=IF(AND(H15="A",I15<=160),J15*2,J15)
=IF(AND(H15="B",I15<=160),J15*2,J15)
=IF(AND(H15="C",I15<=160),J15*2,J15)
=IF(AND(H15="D",I15<=160),J15*2,J15)

View 4 Replies View Related

How To Insert More Conditions In If-statement

Feb 28, 2014

I am working on a search and replace macro. It's purpose is that within a region that varies only in row size, it's suppose to compare two values, A and B. A is only placed in one cell in the region, while B is a one column range in the region.

If A <> B, A should replace all B's in the region.

These regions are placed on top of each other in a long table. Please see the sample workbook, SampleDRW.xlsm

The code I am using is this:

[Code] ......

The problem is if the B value in the next region is the same as the one before but the A value change, my code don't pick up on it, because it only looks for changing B!

How can I expand the code to also pick up on this problem?

View 7 Replies View Related

IF Statement With Conditions: Start From Row 21

Jan 5, 2010

In the table I've created, I have a column (column A) that contains "Y" for the first 20 rows. I'd like to use an if statement in another column (column B) to create a numbered list starting with the first row (from column A) that is blank. For example, if column A contains "Y" in the first 20 rows, I'd like starting in row 21 (in column B) to return a value of "1" and then have the subsequent rows increase in value by 1, so row 22 would be "2", row 23 would be "3" etc. The catch is, if for some reason I make a change in column, let's say extend the "Y"s down to row 25, I'd like column B to reflect those changes by starting the list in row 26.

View 3 Replies View Related

If Statement Using Left And Right Conditions

Feb 16, 2010

I'm tring to put data in empty cells using an formula. =IF((LEFT(A4,5)),"Class",(RIGHT(A4,5)))

View 3 Replies View Related

Two Conditions Not Talking To Each Other In IF Statement

Jul 17, 2012

Formula I've been labouring over which is only bringing back partial results - I don't normally have much call in my role to build nested formulas...

The following is what I have so far:

=IF(AND(AQ2="MortgageSession",OR(J2="LeedsCounselling",J2="Glasgow",J2="Limavady")),
"Mortgage",IF(AND(AQ2="SelfEmployedSession",J2="LeedsCounselling"),"Mortgage","Other"))

The formula is made up of two conditions:

1.
IF AQ is 'MortgageSession'
AND
J2 is 'LeedsCounselling'
OR Glasgow
OR Limavady

I want the cell to return 'Mortgage'

2.
IF AQ is 'SelfEmployedSession'
AND
J2 is 'LeedsCounselling'

I want the cell to also return 'Mortgage'

Everything else 'Other'

I've managed to get the formula to work to a point where it will happily bring something back without error boxes, however it is only bringing back the second condition and ignoring the first - something to do with the join in between these?

View 7 Replies View Related

Include Two Conditions Into IF Statement

Jan 17, 2007

I am trying to include two conditions into this IF statement.

=IF(ISBLANK('SHEET1'!W8),0,1)

I want to include the cell X8 in this aswell.

View 9 Replies View Related

Switch Off Conditions In And Statement

Jan 15, 2010

I have multiple anded conditions both Boolean and numerical. For testing purposes, I wanted to be able to switch off individual numerical conditions in the If statement. It seemed like an easy matter that I could simply comment out the And statement of choice and recompile. When I tried this, I received a compile error.

Another option would be to use individual togglebuttons to selectively turn off the 5 numerical comparisons. I have no idea how to set that up.

how to do this with either commenting or togglebuttons?

The If statement
If OptionButton4.Value = True _
And ToggleButton1.Value = True _
And Range("G3").Value >= Range("N6").Value _
And Range("AV22").Value >= Range("AU22").Value _
And Range("E3").Value = "Long" _
And Range("G3").Value Range("BG7").Value _
And Range("H4").Value >= Range("L4").Value _
And TradeFound = False And _
DeletedFound = False Then

View 9 Replies View Related

IF Statement (counters In It To Start When The Conditions Is Met)

Jul 7, 2009

I have a series of IF statements in a formula. I need one of the counters in it to start when the conditions is met.

i.e. the false section in an IF is along the lines of $B$3+J2, and then it continues down the column $B$3+J3 then $B$3+J4 etc. I need the J# to start increasing when the condition within the IF statement is met, not from the very beginning. When I get to, let's say the 13th row, when the condition is met, I want J2, not J13or14.

View 2 Replies View Related

Adding Additional Conditions To IF Statement

Dec 29, 2011

I need to add a condition to a statement that adds a "If TRUE" reference to another cell.

The other cell can be either a TEXT value "RM1" OR "TE2". If neither condition is true than the value is blank or zero.

So right now I have in the destination cell =IF(AB7="CONT",V7,"") That works lovely, but really isn't countable unless cell "Z7" ALSO has Either "RM1" OR "TE2".

If cell "Z7" has the text "DEA" or "SP" then the value of "V7" will be placed in a different column. I will use a different destination column (for this modified "DEA" or "SP" condition)

View 7 Replies View Related

Multi-Conditional IF Statement With Too Many Conditions?

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

If Statement (sort Data Similar To Below Using The Following Conditions)

Oct 26, 2008

I need to sort data similar to below using the following conditions. If the total of A's is greater than 4 they get an A. If the total of E's is greater than 4 they get an E. If they have more A's than E's, assuming they have at least 4 of each then they get an A. If the total is 5, but they don't have 4 A's then they get an E

NAME E'sA'sTOTAL
John 235 ( so this one should get E)
Mary 459 ( This one should get A)
Tim 112 (This one shouldn't get anything)
Jane 145 ( This one should have an A)
Sam 415 (This one should have an E)

I would like this to sort in one cell - I can do this over 5 cells - but not in one.

View 3 Replies View Related

If Statement (2 Conditions): Cardboard Manufacturing Plant In The Q.A Department

Jan 29, 2007

I work at a cardboard manufacturing plant in the Q.A Department. Occasionally paper claims need to be raised due to the paper being faulty (out of spec.). I have attached a spreadsheet which at present works out the paper cost according to which paper grade is typed into a particular columb. But, paper price varies according to the width (i.e. Deckle) of the paper as well. And this is the variable which I have not been able to implement thus far.

The relevant columbs are 'D', 'E' & 'I' for the purposes of this formula... It should be noted that below this I have pasted in the paper pricing list... and that in general each paper grade has 3 different prices depending on the Deckle (i.e. paper width), so there are 3 possible prices which can be displayed depending on the Deckle inputted into columb 'E'.

View 2 Replies View Related

IF Statement Does Not Produce Required Results: Resulting In Zero Values In Most Conditions

May 25, 2009

I have a work sheet which includes a column of numbers representing certain daily events. I am building a user defined function to analyse the trend in the numbers by assisigning values from -2, -1, 0, 1, 2 based on comparison of two days.

Below is the function I built but it is not working, it is resulting in zero values in most conditions. I have attached the sheet which includes the numbers and the function.

View 3 Replies View Related

Count Unique Logs With Multiple Conditions Of Multiple Sheets

Oct 8, 2007

I've got no clue about all this, but I've had to get specific formula examples and fill in the blanks in order for my timesheet to work. There's just one final problem if somebody could please help.

This is a timesheet for a 5 day work week. I need to count the number of unique log numbers for a specific activity. The log numbers counted must be unique across the entire week, not just for each day, which means I want the formula to count the unique log numbers across multiple sheets.

The formula also has multiple conditions. I got 2 columns. The first part of the formula needs to verify a word, say, "split" and if it does it checks the adjacent cell for a unique log number. If both arguments are true, it counts the log as 1 unit.

Here is a working formula for only one page.
=COUNT(IF(D4:D29="split",IF(FREQUENCY(C4:C28,C4:C28)>0,1,)))

Here's 2 problems with this formula:
1. I will count if it encounters a blank cell in the Log numbers the first time (which will happen as not every activity we do has a log#), but it will stop counting if it encounters a second blank cell.

2. I don't know how to make it work across several sheets.

This is an alternate formula which works and skips the blank cells, but I don't know how to add the multiple condition of "split" and to have it work across multiple sheets. I just copied it Microsoft. As I said, I don't understand it, I just fill in the blanks.

SUM(IF(FREQUENCY(IF(LEN(C4:C29)>0,MATCH(C4:C29,C4:C29,0),""), IF(LEN(C4:C29)>0,MATCH(C4:C29,C4:C29,0),""))>0,1))

View 11 Replies View Related

Inserting Multiple Cells And Shifting Down Column Multiple Rows In IF Statement

Sep 7, 2012

how to shift data in a column down multiple rows while in an IF statement. I am assuming you cannot just simply repeat the insert cell formula.

Here is my code - it's ugly but it was working when I just needed it to move down one cell:

lastrow = Range("A2").End(xlDown).Row
For i = 2 To lastrow
Range("B" & i).Select
If Range("B" & i).Value = Range("B" & i).Offset(-1, 1).Value Then

[Code].....

View 1 Replies View Related

Remove Multiple Data By Multiple Conditions?

Aug 21, 2009

1. I have 4 columns (let's say D,E,I,J);

D E I J
Account1 Sum1 Account2 Sum2
151 93,79 BF2479 30,00
1476757 93,79 BF7 22,00
BF2479 30,00 151 93,79
86041 84,03 23235 30,00
534 6608,45

2. I need to clean the multiple identical data in the list by both Account no. and Sum (of course the list is much longer!) so that the list should look like this:

D E I J
Account1 Sum1 Account2 Sum2

1476757 93,79 BF7 22,00

86041 84,03 23235 30,00
534 6608,45

I must say that I am a beginner in Excel, so I tried to use this:

=IF(OR(E5=$J$5:$J$430);IF(INDEX($I$5:$I$430;MATCH(E5;$J$5:$J$430;FALSE);1)=D5;"";E5);E5)

for column E, and

=IF(OR(J5=$E$5:$E$452);IF(INDEX($D$5:$D$452;MATCH(J5;$E$5:$E$452;FALSE);1)=I5;"";J5);J5)

(which is reverse of the first one) for column J; (The ranges are the ones used in the real sheet), not for the ones in the example above!); The formula does seem to eliminate a dew unwanted data, but does not give me all the wanted results!

View 4 Replies View Related

How To Satisfy Multiple Conditions Using Multiple Criteria

Oct 16, 2009

I'm trying to divide my data into 6 different groups, based on 2 different criteria. First, I am not sure how to write the logical test to take 2 columns of data into consideration (using "&" and "AND" do not work; I am not sure what else to try), and second I can't figure out how to write the formula so that it can select from 1 of 6 conditions.

So, overall here is what I want:

If DL2=3 and CK2=1, then I want this to be labeled as '1'
If DL2=3 and CK2=2, 2
If DL2=1 and CK2=2, 3
If DL2=2 and CK2=2, 4
If DL2=1 and CK2=1, 5
If DL2=2 and CK2=1, 6

These 6 conditions cover all possible combinations of numbers in the two columns.

View 13 Replies View Related

Create Multiple IF Statement And Multiple VLOOKUP Within Same Formula

Aug 11, 2014

I am trying to create a formula which looks in 1 cell to determine 'IF' it states either "BUTT CUT" or "DIE CUT" and then does a VLOOKUP in a table array for each which ever column relates to asnwer to 'IF statement.

This is as far as I have got but even this won't work:

=IF(I15="BUTT CUT",=VLOOKUP(J15,V13:Z22,2,FALSE))

View 7 Replies View Related

IF Statement Using Multiple Variables To Give Multiple Outcomes

Feb 6, 2009

I'm looking to work out an IF statement based on a series of dates entered to give 1 of 3 possable outcomes. Where:

A1: todays date (exmaple =NOW())
B1: due date (exmaple 10/02/09)
C1: completion date (example 12/02/09)
D1: status (overdue, outstanding or completed)

D1: =IF(A1>B1,"overdue",IF(A1<B1,"outstanding",IF(C1<=>A1 & B1,"completed")))

I know the last part is totally wrong (symbols arranged in that manner), but to clarify i would like the date entered in C1 to override the other statements in the fomula to make it read "completed". If no date is entered in C1 then the formula will return either "overdue" or "outstanding" depending on the other dates in A1 and B1.

View 2 Replies View Related

Sum On Multiple Conditions In Multiple Columns

Nov 29, 2008

My data looks somewhat like this :

X Y Z
DOU Quarter Sum
0 Q1 = sum of 1's in Q1
1 Q1 = sum of 1's in Q2
1 Q2 = sum of 1's in Q3
0 Q2 = sum of 1's in Q4
1 Q3
1 Q1
1 Q4
0 Q2

A cell in the SUM column must contain the sum of 1's in column DOU if under column Quarter the value is Q1. Similarly for Q2, Q3 & Q4 if only the corresponding value under DOU is 1.

Its like.. count the number of 1's per quarter and come up with the sum in 4 distinct cells for each quarter.. i.e. quarter-wise sum/count of 1s

View 9 Replies View Related

VBA Multiple IF Conditions

Aug 9, 2009

If ActiveCell.Value < -25 And ActiveCell.Offset(-2, 0).Value < -25 And ActiveCell.Offset(-3, 0).Value < -25 Then
Range("C4").Select
End If
End Sub

I am looking to do something similar on excel 07 as follows:
Range("O16").Select
IF ActiveCell.Offset(0,-1)Value ="1" And ActiveCell.Offset(0,-2).Value = "1" Then
ActiveCell.Value = "1"

Compile error expected: Then or GoTo At the First value (which I have highlighted in red)

Also would like the If formula to repeat for range O16:O36.

View 9 Replies View Related

Sum With Multiple Conditions

Jan 29, 2007

see attached workbook.

I need to create a conditional sum in the report tab in the yellow cells that will sum all the values from the list sheet, based on the following conditions.

1) The name is in the list
2) The code in the list is one from the codes tab.

I saw somewhere that I need to put an 'OR' statement in the conditional sum but I can't get it work. It seems to add up values for the code 'HOLIDAY' and I don't want it to.

View 3 Replies View Related

If Formula Using Multiple Conditions?

Nov 29, 2013

I cant seem to rack my brain around how to go about making a formula in order to achieve my desired effect using the IF Formula. The data is as follows:

Worker Status %
S1 75% and higher
S2 42.8571% -74.9999%
SH Anything below 42.8571%

My sheet pulls the workers status from a preset data table, lets say S2 for Joe. I want the cell beside his status to compare what his percentage is and display what the status should be (based on the conditions of the above table). If hes working 73% it will turn up S2 and I can compare the value from the table and the value generated based on his working percentage (I would use conditional formatting to color the cell red or green to indicate if it matches or not.)

View 4 Replies View Related

Vlookup And Multiple Conditions?

Dec 17, 2013

Is VLOOKUP suitable for if one wants to lookup a value from a defined range based on two assumptions?

Enclosed is an example file.

I want to lookup the values in sheet1 in the defined range in sheet2 and write enclosure and density to sheet 1

what method to use?

nicolaiBook1.xlsx

View 6 Replies View Related

Another IF Function With Multiple Conditions?

Mar 1, 2014

My spreadsheet looks like this:

Column A: Individual
Column B: Not used in formula
Column C: Not used in formula
Column D: Location
Column E: Duration in Minutes
Column F: Pay (Column E)*(Column G)
Column G: Formula

(simplified version listed below)

[Code].....

To be clear of what I'm trying to achieve:

When in location 1 & 2 (Column D), the pay for each individual is a different rate depending on the duration in Column E, but when in Location 3, the rate is consistent no matter what the duration.

My question is:

How do account for individuals who aren't individual1? That is, my understanding of the above formula is that I need to list each individual that will appear in Column A for it to work. What if I just want to apply the above to individual1, but apply some other calculations to all other individuals?

I had tried adding these lines (with their corresponding closed-parentheses at the end)

[Code]....

But it doesn't work. I'm guessing it's some sort of OR, but I don't yet grasp how.

I should note that my formulas are all on one line in my spreadsheet, I just have them on separate lines to make it easier to find my way around.

View 14 Replies View Related

How To Use Count With Multiple Conditions

Aug 4, 2005

I have a table in Excel:

The first row is time in years.

The second row is method name,say,"A","B","C".

I want to count the number when the time is less than 5 years AND "A"
method is adopted.

I tried this:
count(if(AND(C2:Z2<5,C3:Z3="A"),C2:Z2) but it didn't work.

how to revise the formula?

In the mean time, count(if(C2:Z2<5,C2:Z2))worked as well as
countif(C2:Z2,"<5")

View 9 Replies View Related







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