Excel 2010 :: If Statements For Date Ranges (Nested)
May 18, 2013
I have got a table with data from 2005 to date, (for example) For the purpose of what I am doing I need a column which shows date ranges between September 2005 - August 2006 to show as 2005/2006, then September 2006 - August 2007 to show as 2006/2007. I have done some research and seen that, Potentially, a nested 'IF' can be used but it can only be used 7 times which would cause a problem going forward....
Is this the only way or is there a better way (without using VB)?
I am using Excel 2010
View 7 Replies
ADVERTISEMENT
Oct 15, 2011
Using Excel 2010.
I extracted data from .pdf to Excel using Able2Extract. Now I need to scrub the output a bit.
I see commonalities in the data for the start and stop of each set of data that I can key in on.
Once I find the start and stop points for each set of data I would like to fill all rows in-between the points and then discard anything that remains outside of these boundaries.
I have something wrong in my logic, way too many rows are deleted.
Code:
Option Explicit
Sub GetLineSets()
'Purpose: Identify relevant line sets, delete all other rows
Dim wbBook As Workbook
Dim wsData As Worksheet
Dim strFormula As String
Dim lngRows As Long
Dim C As Range
Dim blnFlag As Boolean
[Code] ......
View 4 Replies
View Related
Jul 29, 2014
1) What's the maximum limit of IF statements in a formula for MS Excel 2010?
2) I have 8 nested IF statements, but I am having trouble with the False part of the argument. I was able to get the False part to work for the 4th argument (because I simply put a comma and closed it's respective colored parenthesis) but the following 3 I can't seem to get and the following message pops when I hit enter "The formula you typed contains an error."
For the False part of the remaining 3 nested statement which is at the end of the formula I just type:
IF($E$2="Q3"........)))IF($E$2="Q2".....)))IF($E$2="Q1")))
And close it's respective colored IF statement argument. I tried putting a comma at the end of each False part for the arguments but it pops with the message "You've entered too many arguments for this function."
View 9 Replies
View Related
Jul 5, 2012
Using Excel 2010.
I am trying to come up with a formula that will return a total average from two columns of dates with criteria. The range will need to cover an entire column as my data is continuously growing and the criteria would have to limit the start date to each month. I have tried
=AVERAGEIFS(DAYS360(A:A,B:B),A:A,">5/1/2012",A:A,"5/1/2012",A:A,"
View 2 Replies
View Related
Jul 24, 2013
I am trying to get excel to count a value if (and only if) two logical conditions are fulfilled on two different cell ranges.
1st condition: In cell range x, the value should = C2
2nd condition: In cell range y, the value should be greater than 0
I've tried an AND statement and failed, and I've also tried COUNTIF statemetns and had no more luck. This could well be due to my skill level however.
View 4 Replies
View Related
Oct 14, 2009
How can I combine the two below statements like these to make one "Or Statement"? Sorry...I haven't done excel and/or's in forever?
=IF(('Proj Info'!L10="main")*AND('Proj Info'!L9="CT"),"BMSVC",'Proj Info'!L9)
OR
=IF(('Proj Info'!L10="serv")*AND('Proj Info'!L9="CT"),"BMSVC",'Proj Info'!L9)
View 2 Replies
View Related
Mar 14, 2014
I would like to create a function where I would be able to ask and answer 20 questions. When using If statement it only allows me to use up to 7 nests.
I have created an example below with all the statements I need using IF but of course this doesn't work so I would need so how to handle this particular issue with so many questions/answers in one. Even though the delta between 5-4 and 3-2 is same I want different answers. I'm using Excel 2010.
=IF(AND(AK58=5;AL58=5);"OK";IF(AND(AK58=5;AL58=4);"1 OP";IF(AND(AK58=5;AL58=3);"2 OP";
IF(AND(AK58=5;AL58=2);"2 OP+1 NV";IF(AND(AK58=5;AL58=1);"2 OP+2 NV";IF(AND(AK58=5;AL58=0);"2 OP+2 NV+INST";
IF(AND(AK58=4;AL58=4);"OK";IF(AND(AK58=4;AL58=3);"1 OP";IF(AND(AK58=4;AL58=2);"1 OP+1
[Code]...
View 7 Replies
View Related
May 16, 2014
I am trying to use the IF formula or a similar VBA/Macro to color certain cells. We deal with 16 different sand types that come in on rail cars. I want to put in the sand type in a cell; EX: C11 has text "30/50BH" if this statement is true to color cells A11-D11 yellow. If it is not a true statement to check for the next sand type, "20/40BH" and go on from there. If I can get an example of what to do I can build it for the 16 sands we have.
The formula I have in mind would be something like
=IF("30/50BH",[colorA11:D11,Yellow],[IF("20/40BH",[colorA11:D11, Purple], .......
I'm sure there is a less brute force method of doing this, but my knowledge of programming and excel is limited. I am using the 2010 version of Excel.
View 14 Replies
View Related
Oct 30, 2009
I'm hoping someone can help me sort this out. I have a formula I need te determine if a TAT was 'met' or 'missed' and it has multiple criteria. Here is the formula I am trying to get to work:
=IF(AND(I2="Amendments",F2<=3,IF(AND(I2="Renewals",F2<=1,OR(D2<=G2)))),"Met",IF(F2="n/a","n/a","Missed"))
I've been able to get separate pieces of the formula to work correctly, example:
=IF(AND(F2<>"n/a",I2="Amendments",F2<=3,OR(D2<=G2)),"Met",IF(F2="n/a","n/a","Missed"))
but when I try to combine everything into one string I can not get it to work.
View 10 Replies
View Related
Jan 12, 2010
I cannot get the following nested IF statements to work and get the "Else without If" error for the first Else If statement. I had assumed the first "If" would apply to this
Private Sub ReconcileNow()
If txtTValue = "" Then
Exit Sub
End If
View 9 Replies
View Related
Mar 27, 2014
In the example below, could you use anything else other than "with"? Couldn't you use two if's?
[Code]....
View 1 Replies
View Related
Sep 29, 2009
I have ranges that are added (E11,E14,E16,E18) if no exemptions exist (my check boxes). I have IF statements with two check boxes. If one checkbox is selected a seperate calculation is performed and the result is placed in cell AH49. My other check box places it's formula in cell AH50. But if I check both boxes I want the value from cell AH52 to display. However, it doesn't display, it gives the value from cell AH49. Is the code wrong?
=IF(AD49=TRUE,AH49,IF(AD50=TRUE,AH50,IF(AND(AD49=TRUE,AD50=TRUE),AH52,SUM(E11,E14,E16,E18))))
View 2 Replies
View Related
Dec 13, 2013
I'm trying to nest the following:
=IF(VLOOKUP($F6,'Dept location'!$A:$B,2,FALSE)>0,VLOOKUP($F6,'Dept location'!$A:$B,2,FALSE),FALSE)
=IF(VLOOKUP($H6,'Project location'!$C:$K,9,FALSE)>0,VLOOKUP($H6,'Project location'!$C:$K,9,FALSE),FALSE)
=IF(VLOOKUP($V6,'Dept location'!$A:$B,2,FALSE)>0,VLOOKUP($V6,'Dept location'!$A:$B,2,FALSE),FALSE)
To start with, not sure I have the ">0" part correct in the above IF statements. That expression is meant to be asking it: Is the VLOOKUP finding valid data (result #N/A)?
Next, comes the nesting part. If the VLOOKUP isn't finding valid data (result = #N/A), then I want it to move on to the next IF statement.
I have 3 different columns I want it to look at; hence, the 3 IF statements. In the end, if none of the three IF statements results in any valid data, I want it to give the result "Research".
View 2 Replies
View Related
Dec 13, 2006
Income less than 10,000 490 flat fee
Between 10,000 100,000 9.00%
Next 100,001 400,000 7.00%
Max 400,001 800,000 4.25%
iF(F19midbandMAX,(LowerbandMAX*lowerbandPERCENT)+(midMAXAMOUNT*midbandPERCENT)+(F19-imidbandMAX)*maxbandPERCENT))))
And excel is kicking out the formula "You've entered too many arguments"
(the formula doesn't cater for the 800000 max yet either
View 9 Replies
View Related
Jul 7, 2014
I am trying to write one Excel formula that can accomplish the following: Review a Discount Sheet to determine whether a Class Name should be purchased based on its current discount compared to my Target Discount for that Class Name. The majority of the time, weekly discount changes occur in 5-10% increments, but occasionally they will occur in increments of 20% or more. If a discount percentage increases by 20% or more and surpasses my Target Discount, the current method I am using to automate this process does not work.
Example: Last week's discount in cell G2 is 25%, and this week's discount in cell H2 is 40%. The Target Discount for that class is 30%, so under my current system I would not request that Class Name for purchasing because the current discount does not exactly equal my Target Discount, even though the previous week's discount did not exceed my Target Discount and now I should purchase that Class Name because the discount has gone from not meeting to exceeding my Target Discount.
INDEX MATCH used to retrieve current discount:
=INDEX('Discount Sheet'!$H$2:$H$4910,MATCH(A3,'Discount Sheet'!$F$2:$F$4910,0))
Validity Test in Cell F2 to compare Current Discount to Target Discount:
=E2=C2
NOTE: The above validity test could include a >= to capture Current Discounts that have exceeded the Target Discount; however, over time all Current Discounts will exceed the Target Discount. It is only when last week's discount did not exceed the Target Discount and now the Current Discount does exceed the Target Discount should a class be purchased.
The final result of this formula should be "TRUE' or "FALSE" without having to cut and paste any data for additional validity comparisons.
View 5 Replies
View Related
Apr 9, 2009
I've been using nested IF statements, with success for a while, but now I'm into my fourth nested statement I'm starting to get some problems.
=IF($P15>0,SUM(IF(APR09!$M$2:$M$500=Department!$M$1,IF(APR09!$B$2:$B$500=$Q$6,IF((AND(APR09!$G$2:$G$ 500<>Department!$N$29,APR09!$G$2:$G$500<>Department!$N$30)),1,0),$N$2))))
Is what I've come up with so far. However, this returns 0, even though there are 3 items which should resolve the criteria. The main problem is here: IF((AND(APR09!$G$2:$G$500<>Department!$N$29,APR09!$G$2:$G$500<>Department!$N$30))
Where I am trying to make the sum increase by 1 if the cell from the row in question, having made it through the first 3 IF statements is not equal to either of those two cells (a range would be better) then the Sum needs to be increased by 1.
View 3 Replies
View Related
Jul 1, 2009
I have this nested if statement, but my last IF statement needs to incorporate another component.
View 2 Replies
View Related
Oct 16, 2009
Trying to make it even more complicated....probably again misplaced my parenthesis
=IF((AND('Input Page'!B43="-",OR('Input Page'!B13="New Lease In-House",'Input Page'!B13="New Lease w/Co-Broker")),'Analysis Report'!D57*'Input Page'!B32/”2”,'Analysis Report'!D57*'Input Page'!B32/"4",IF(AND('Input Page'!B43="-",OR('Input Page'!B13="Renewal In-House",'Input Page'!B13="Renewal w/Co-Broker",’Input Page’!B13=”Expansion In-House”,Input Page’!B13=”Expansion w/Co-Broker),'Analysis Report'!D57*'Input Page'!B32,'Analysis Report'!D57*'Input Page'!B32/"2"))
View 6 Replies
View Related
Apr 29, 2013
I am very new at in depth excel formulas, usually in my daily work I can get by with simple summations, if statements etc. This one has thrown me for a loop.
I'm making a spreadsheet on soil compressibility and I feel like I am just knocking my head against the wall. Here is what I am working with. I need to calculate values in a column, we'll call them "Rm" values.
There are a few basic things that dictate which "Rm" equation you use. I'm substituting V,W,X,Y,Z in for the equations to simplify the question.
I = 3 Rm= W*log(K)
.6
View 9 Replies
View Related
Apr 27, 2007
I have a workbook with two worksheets, Sheet1 and Sheet2. Sheet2 contains a table of values that need to be input into a cell on Sheet1, pending the results of comparing two other cells on Sheet1. I have 8 possible variations resulting from that comparison and I cannot make this work as the IF statement limits you to 7 deep.
Example:
Sheet1
A1 (text string value) = LOWER
B1 (text string value) = L1
C1 (currency with no decimals) = Sheet2!Somecell (decision of which cell to use depends on combination of A1 and B1)
A1 can be either the string "LOWER" or "MIDDLE". B1 can be the strings "L1", "L2", "L3", or "L4". The strings in B1 are not cell references, but simple text. This leads to four variations for a row that has "LOWER" in it's A column, and the same for "MIDDLE" - totaling 8 possible combinations.
Depending on the combination, I need to input a number from Sheet2 and that number is different for each unique combination of the eight possibilities. There is no mathematical calculation taking place on Sheet2 - just an "if x and y then z" decision on Sheet1. I will use the value of Sheet1!C1 in other math functions on Sheet1.
View 9 Replies
View Related
Jul 5, 2007
I know there is a maximum of 7 nested IF statements available but I cannot get the following formula to work, even though it only has 7 IF's
=SUM(IF(Department=J$88,IF(Progress_StatusCNP,IF(Progress_StatusCSO,IF(Progress_StatusNS,IF(Current_Phase=$B91,IF(MID(Progress_Status,1,7)="On Hold",IF(MID(Group_Procurement_Involved?,1,3)="Yes",In_Year_Opportunity__2007,0),0))))/1000)))
CNP, CSO and NS are named cells, all named ranges are the same size and the formula is entered with Ctrl & Shift to make an array formula.
View 3 Replies
View Related
Oct 17, 2012
I am using Excel 2010. I created a macro to fill a report. Each section of the report is a department, each department has 53-55 (I forget the exact number) lines underneath the department number. So in the macro, for each department I am trying to use the code block
Code:
If Not IsNothing Then
If WorksheetFunction.CountA(Cells) > 0 Then
LastRow = Range("D60:D114").End(xlUp).Row
[Code]....
The font in red is the variable range. The first department has Range("D58").End(xlUp).Row for example. When I run the second department, it finds the empty cell under the first department's section. For example: I go to run the second department with the range of D60:D114, the cell that is selected by the "Address = "portion of the code is D10, because D4-9 has information in it.
What I need is for it to see that D60 (or D61, etc) is empty and paste the copied information into that cell. I am trying to find a way to do this without using "If cell D60 > 0 Then Activecell.Offset(1,0)", because this is a yearly report being filled in every week.
View 5 Replies
View Related
Jul 17, 2012
I am using VBA to put a formula into a cell. The formula is
VB: = IFERROR(VLOOKUP(LEFT(A5,11), 'New Quarterly Report'!A$11:E$37,3,FALSE), " - ")
But when I try to put this into a cell using the value option, I get a run time error 13: Type Mismatch. No problems while im compiling it but it comes up only during execution
VB: Sheets("Summation Table Template").range("B4").Value = "= IFERROR(VLOOKUP(LEFT(A5,11),'New Quarterly Report'!A$11:E$37,3,FALSE), " - ")"
When I try to put only the VLOOKUP, it works fine.
VB: Sheets("Summation Table Template").range("B4").Value = "= VLOOKUP(LEFT(A5,11),'New Quarterly Report'!A$11:E$37,3,FALSE)"
But I want the cell to not show #N/A when a value through vlookup is not found. Other formulas Iv tried are to use ISERROR with IF and also to store the formaula in a string and then put it into Range.Value but it still gives me a run time error 13.
View 2 Replies
View Related
Jul 24, 2008
I have been asked to go through some information which has over 200 000 lines, what I need to do is as follows:
where order number is unique, revenue source = "Unique"
where order number appears more than once, check division to see if it appears in more than one division, if it does revenue source = "Cross Selling", if it does not then revenue source = "Divisional Package"
I need all of the above in formula line which will be inserted in the revenue source column
I have attached the file with a sample of the information I am using.
View 9 Replies
View Related
Jul 26, 2006
I am trying to return a text statement using nested IF statements. In order to find the value in the IF statements, I have to use lookups.
Example: ....
View 14 Replies
View Related
Sep 23, 2006
creating Named Formulas to handle nested IF & And statements, to get around excel's limit of 7 nested IF statements.
First of all, is it possible to create a Named Formula with combined IF with AND statement such as: =IF(AND(F26>=54,F26<=77.99),"2x3"," ")--I am getting a periodic error message: "Cell with block IF function should not contain anything else."?
I am trying to: 1. Contstruct two separate Mega formulas using IF & AND to determine what range of sizes , located in Col "F", should fall into which SIZE_CAT, sample of ranges are as follows:
SIZE_CATSIZE IN TOTAL INCHES
2X3 54 thru 77.99
3X5 78 thru 108
4X6 108 thru 138
2. Name these two formulas, FirstNamed and SecondNamed
FirstNamed formula is:=IF(AND(F26>=54,F26<=77.99),"2x3",IF(AND(F26>=78,F26<=108),"3x5",IF(AND($F26>=108,$F26<=138),"4x6",IF(AND($F26>=138.01,$F26<=168),"5x8",""))))
SecondNamed formula is:=IF(AND($F30>=168.01,$F30<=198),"6x9",IF(AND($F30>=198.01,$F30<=234),"8x10",IF(AND($F30>=234.01,$F30<=270),"9x12",IF(AND($F30>=270.01,$F30<=320),"10x14",IF(AND($F30>=320.01,$F30<=500),"Larger","")))))
3. Combine two named formulas with a "Master Formula" such as:
=IF(FirstNamed,FirstNamed,SecondNamed)
I got the IF with AND formulas to work in a test columns, but cannot seem to get them to respond properly when trying to get them into a Named Formula(s).
I have attached an example of the workbook.
View 3 Replies
View Related
Jun 10, 2014
I am trying to produce a report of supplier transactions sorted by area code. I have a spreadsheet of data consisting of Supplier Code, Supplier Name, Transaction Amount and Area Code.
I want to be able to firstly seperate the transactions by area, then also consolidate the data so it shows one row per supplier with total amount spent on that supplier and a transaction count on that supplier. I know how to sumif the transaction total and countif the transaction count.
However I have problems consolidating the suppliers in to one row per unique supplier and I also have problems nesting an AND statement in to the sumif/countif statements. I need additional criteria in the forumula to only count transactions in a specified area code.
I've attached an example spreadsheet to make it alot clearer. See results sheet in this workbook.
View 3 Replies
View Related
Jan 11, 2010
I am trying to use the following formula in Microsoft Excel 2007-
ROUND(IF(DataInput!$D$5 = "Black",0.81*E4*O4,(IF(DataInput!$D$5 = "Red",J4*0.025*E4*O4,(IF(DataInput!$D$5="Green",(57.00+IF(J4>25,(J4-50)*33.59,0))*O4))))),2
I want to use an IFERROR statement. If the results do not equal Black, Red or Green, I want the data to error so I can have the word FIX showing.
View 2 Replies
View Related
Jun 12, 2009
Excel spreadsheet will contain a form that will consist of drop down boxes (data validation). Each drop down box will define the data that can be selected in the next drop down box.
The way I initially went about it, is creating nested IF statements. However, we all know there is a limit of 7 nested IF statements. I have 10! So below formula does not work:
=if(B5=1,F5:I5, if(B5=2, F6:I6, if(B5=3, F7:H7, if(B5=4, F8:J8, if(B5=5, F9:H9, if(B5=6,F10:G10, if(B5=7,F11:H11, if(B5=8,F12:H12, if(B5=9, F13:I13, if(B5=10, F14:K14))))))))))
I tried other workarounds such as CONCATENATE, or & signs. No luck. VLOOKUP does not work also, because there are multiple columns in col_index_num. Anything else I try gives me this message:
“The List Source must be a delimited list, or a reference to a single row or column”
What should really happen is this:
User selects value in first list box. Second list box shows values associated wih the value from the first drop down only.
View 9 Replies
View Related
May 8, 2012
I am using Excel 2010. I have a spreadsheet where column A is for Quarter, column B is for Employee, and columns C-R are for Codes (Code1; Code2; Code3; etc. through Code15). One line might have no values in the codes columns, another might have values in only Code1, another might have values in Code1 and Code2, and another might have values in all 15 columns.
A B C D E F --> R
1 Qtr Emp Code01 Code02 Code03 Code04 --> to Code15
2 2012.1 Liz CER02 INS12 WKH15
3 2012.2 Jim PIN55 WKH12 WKH19 WKH23
4 2012.2 Jon
5 2012.2 Jim WKH15 WKH23
6 2012.2 Jon PIN55 WKH15 WKH12 CER08
The worksheet is named "ALLAUDITS" and the named ranges are as follows:
Quarter: =offset(allaudits!$A$1,0,0,counta(allaudits!$A:$A),1)
Employee: =offset(allaudits!$B$1,0,0,counta(allaudits!$B:$B),1)
CodeData: =offset(allaudits!$C$1,0,0,counta(allaudits!$C:$C),15)
On another worksheet I need to be able to count how many times WKH15 appears in the CodeData range within a certain Quarter. I tried
=countifs(Quarter,"2012.2",CodeData,"WKH15")
But that didn't work, and from what I can tell in Excel support, it's because the ranges are different sizes. I have over 6500 rows, so I'm trying to avoid having to name all 15 columns and then do a sumproduct on all of them, such as
=sumproduct((Quarter="2012.2")*((Code1="WKH15")+(Code2="WKH15")+.......)))
Calculation would take forever.
I could just create a pivot table based on the "allaudits" worksheet, but I can't figure out how to get the actual codes as the row headers (instead of Code1, Code2, Code3, etc.).
View 3 Replies
View Related