Lookup And Nested If

Dec 22, 2005

I am trying to write a function such that the data returned to a given cell
will vary depending upon the data entered into another cell. For example:
If A1= 105, then G1=20; if A1=106, then G1=15

I have more variables for A1 than 7, so I don't think that nested if...then
statements would work. Can I do this using VLOOKUP?

View 10 Replies


ADVERTISEMENT

Nested LOOKUP Function Returns Incorrect Data

Apr 22, 2008

I setup this function to pull my staff's schedule an auto generate the forms i need however the lookup function works properly sometimes and improperly others i checked the syntax and it is correct how ever the wrong data is continually returned. I have attached the file if anyone can help. the VISUAL PLAN tab is the one contaning the formula and it pulls data from PLAN, CURENT SCHEDULE, AND CATAGORY SUMMARY however the only formulas hat i have a problem with are the ones referencing CURENT SCHEDULE.

View 9 Replies View Related

Multiple Lookup Values Rows And Columns To Lookup Single Target Column On Right End?

Apr 7, 2014

I have a table of data (say Column1 to Column 5) with multiple rows.

Column 1 to 4 will have the lookup values in multiple rows and Column 5 data should be picked up using vlookup or other lookup function.

I managed to somehow bring all these lookup values in (Column 1 to 4) in a single column in another sheet. I am now trying to use some lookup or other functions to match this single column and pick column 5 data in original sheet. Result i am expecting is lookup value in first column and next to it column 5 value.

It is basically a lookup wherein lookup value is spread over multiple rows and columns and result column is fixed. I tried using vlookup, but lookup value column and column number had to change every time when i moved from column1 to 4.

View 3 Replies View Related

Fastest Lookup Method: Use A Key To Lookup A Value (VLookup, Index/Match, DGet, And The Rest)

Mar 26, 2008

Excel offers many ways to use a key to lookup a value (VLookup, Index/Match, DGet, and the rest). What's the fastest way to perform a lookup of a small table of, say, 30 rows of key-value pairs? Theoretically, it would be most efficient to use a branch table (also known as a jump table). See the wikipedia article for branch tables: http://en.wikipedia.org/wiki/Branch_table. Does Excel/VBA have a way to create a branch table for such lookups?

View 9 Replies View Related

Tabled Lookup: Able To Lookup If Anywhere In A Cell Contains A Word From A List Of Words, And Then Provides An Output

Apr 27, 2009

I want to be able to lookup if anywhere in a cell contains a word from a list of words, and then provides an output.

Column G:
VAT payment
HMRC payment
Pay VAT

I have a table on the side that shows:
Column Y Column Z
VATHMRC
HMRC HMRC

ie. If anything in column G matches one of the words in Column Y, then output the Column Z. I have use a Vlookup that works for the first two, as VAT is the first thing, but dont know how to make it work if the key word is in the middle of the cell.

View 3 Replies View Related

LOOKUP / MATCH Function To Lookup The Owner Name Typed In Cell

Jan 2, 2009

I have a workbook with 2 different types of sheet - 1 containing source data and the others 'collecting' data from the source sheet, depending on what the sheet is for.

For example, the data source contains different pets, their names, ages and their owners.

The other sheets are on a one-per-owner basis.

What I would like to do is use a LOOKUP / MATCH function to lookup the owner name typed in cell A1 of the output sheet and match it with the corresponding owner name(s) on the source sheet. I would then like it to return with each pet and append the results on the sheet accordingly - like below:

John Smith (in cell A1)

Pet - Name - Age
-------------------
Dog - Rover - 3
Goldfish - Tom - 1
Gerbil - Chewit - 4

View 7 Replies View Related

Lookup Table (adjust Which Column The Lookup Function Refers To)

Jun 12, 2009

I am trying to perform a lookup (vlookup) function in a cell in excel and wish to have the range as a variable, so that I can adjust which column the lookup function refers to.

View 4 Replies View Related

LOOKUP With AND Requirements (lookup A Particular Student's Grade In A Particular Assignment)

Jan 26, 2010

I'm making my own gradebook (attached) and one of my sheets will list scores for each student in different assignments. I have one sheet which keeps track of all students and all assignments with other info. I would like to program cells in one sheet (the third in the attached file) to lookup a particular student's grade in a particular assignment. I figured trying a LOOKUP with an AND requirement might work but it keeps returning the message "could not find value".

My formula references the student's name and the assignment from the identifying cells so that it is easy to copy and paste. I wondered if it was this which resulted in the error, but doubt it.

View 4 Replies View Related

Lookup Function To Lookup For Data In Another Table

Jul 29, 2008

I am trying to use lookup function to lookup for data in another table (we call it table A). Unfortunately, whenever the code is not in the table A, Excel will return the data from the previous row.... is there any possible way to prevent this... in another word, if the code does not exist in the table A, I want Excel to return 0 or some other figures.

View 9 Replies View Related

Lookup Data Left Of Found Lookup Value

Nov 28, 2006

here is an example....

(this is on a sheet called Summary)

----A--------B --------C------- D
1Names----At Bats----Hits----Batting Average
2Tom-------38--------31------.816
3Derek------19--------14------.737
4Joey-------40--------28------.700
5Chris-------40--------27------.675
6Chuck------37--------24------.649

Using the LARGE function, Excel has created a list based on batting averages(on a separate sheet called Line-up). It looks like this.....

---A----------B
1Names----Averages
2 -----------.737
3 -----------.700
4 -----------.675
5 -----------.816
6 -----------.649

The problem I am having is figuring a way for Excel to also bring the corresponding names (after using the LARGE function to create the line up list).

View 3 Replies View Related

Lookup Matching Data & Subtract From Another Lookup

Jun 12, 2007

I have a very large spreadsheet of customer information(I call it the master spreadsheet). Each row contains only 3 things: Account number, product bought, Price

Later I receive the money from the customer for that product(the pay sheet) that contains the exact same thing in the same order: Account number, Product bought, Price paid.

What I'm trying to do is compare the two spreadsheets so that when i receive the pay sheet of cusomters who have paid with the amount it will deduct it from the master sheet.

So it should compare account numbers when it finds a match then it should subtract the amount paid (column C) from the master spreadheet price column(column C also).

sometimes customers don't pay the right price so it has to be a subtraction so I can see if it was over paied, underpaid etc.

Right now I'm still doing it manually combining the two documents sorting it by account number and checking for matches in column A (account number).

View 5 Replies View Related

More Than 7 Nested If -Then - Else Through VBA

Dec 11, 2009

My objective is to replace a text string with a numeric variable. The string has text values such as US, Canada, Germany, France etc, There are about 15 such words in total. Each row will have a different one of the 15 text strings.

Each text string has a corresponding number, which I want to use in various formulas throughout the spreadsheet. The numbers are located on a separate worksheet (“Match Rate”), within the same workbook. I obtained the numbers from a formatted report, which I simply pasted into the second worksheet. Due to the complexity of the report, I can’t reformat the numbers to allow use of the VLOOKUP function.

I created the following function, but unfortunately it doesn’t work. Can you help, please?

I’d like to stay with a VBA solution, since a simple if/then sequence such as this is an excellent introduction to the powerful world of VBA... (it just doesn’t work, yet). I suspect the problem is in the calls to the Match Rate Worksheet.

View 11 Replies View Related

IF And Then Nested. How Much Nested?

Jan 17, 2008

Ok. Here's what I'm trying to do. I have a drop down menu of certain providers located on cell F5. Each one charges different rates per day located on another sheet. Here's the kicker two of those providers charge different rates depending on the amount of days. Those two are UASC and CMA. For the First 5 days they charge one rate and after the 5 days they charge an increased rate.

I'm trying to have one cell located on the first sheet display this information with all the proper calculations. The below formula gives me a false value. I'm not even sure if it works. I know a little bit of excel through some intro courses in college but I'm not sure if a formula like this would work. I know laugh it up.... : ) but I'm not too saavy with formulas....

View 9 Replies View Related

Nested IF In VBA

Jul 8, 2008

I have a total of 30 nested formulas that (ofcourse) dont work in excel.

Here is an example of the first 7 nested IFS

(1) IF(MID(A7,8,9)="GIR",INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0)),
(2) IF(MID(A7,8,9)="NL",INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0)),
(3) IF(MID(A7,8,9)="BE",INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0)),
(4) IF(MID(A7,8,9)="AT",INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))
(5) IF(MID(A7,8,9)="DE",INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))
(6) IF(MID(A7,8,9)="PH",INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))
(7) IF(MID(A7,8,9)="AUBE",INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))

I tried this code but it is not working.

Function LookupRetrieve(pVal As String) As Long

If pVal = "(MID(A7,8,9)="GIR" Then
LookupRetrieve = INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!
C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))

ElseIf pVal = "(MID(A7,8,9)="NL" Then
LookupRetrieve = INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!
C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))

ElseIf pVal = "(MID(A7,8,9)="BE" Then
LookupRetrieve = INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!
C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))

ElseIf pVal = "(MID(A7,8,9)="AT" Then
LookupRetrieve = INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!
C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))

ElseIf pVal = "(MID(A7,8,9)="DE" Then
LookupRetrieve = INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!
C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))

ElseIf pVal = "(MID(A7,8,9)="PH" Then
LookupRetrieve = INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!
C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))

ElseIf pVal = "(MID(A7,8,9)="AU" Then
LookupRetrieve = INDEX('ERIS INPUT'!$C$2:$C$65536,MATCH(A7,IF(Reconciliatie!
C$3:C$65536=C7,Reconciliatie!A$3:A$65536),0))

Else
LookupRetrieve = "isingcode missing"
End If

End Function

The formula is a vlookup formula (Index/Match but with multiple criterias such as the use of Mid).

I tried Concatenate but the formula is too long and has a lot of characters and VBA seems better.

View 9 Replies View Related

Nested If-then

Dec 7, 2009

I'm building a macro and need to know how to add a nested if-then statement. I need to create a formula in a new column whose value extends to the last row of the database. My base formula is sumproduct(--((A2:A:last row which I need to calculate&B1:B same thing)=A2&A2))

View 9 Replies View Related

VLOOKUP With Nested IF

Mar 20, 2014

I am trying to make this work. VLOOKUP (B2,"lookup tables'!$A$4:$A$11, if(D2'="ST" 'lookup tables!$C$4:$E$11.

I am attaching the file : MDCC Reservations.xlsx

I am trying to get the Daily room charge.

View 5 Replies View Related

NESTED IF And AND Functions?

Jun 30, 2014

I am trying to write a formula that will satisfy the following:

C1 and G1 are number values.

IF (cell E1 does not contain any text) AND (G1-C1-12.5>=0), then output (G1-C1-12.5), otherwise output nothing (""). BUT, IF (cell E1 DOES contain text) AND (G1-C1-13>=0), then output (G1-C1-13), otherwise output nothing.

View 2 Replies View Related

Nested IF Or VLOOKUP

Nov 7, 2007

Level RatingA RatingB RatingC Low Medium High
2 x x x x x x
3 x x x x x x
4 x x x x x x
5 x x x x x x

I need to be able to do nested loops. I want to have a criteria that if a person is in LEVEL 2 and RATINGC and HIGH, then take the value under that.

View 9 Replies View Related

Going Beyond 7 Nested If Arguments

Aug 5, 2009

Im needing to achieve what an 11 argument nested if would manage, ie: ...

View 2 Replies View Related

Nested IF/OR With VLOOKUP

Sep 24, 2009

I'm trying to build this formula and I'm only half way through it and it already isn't working.
Column D - can be 1, 2, 3, or 4
Column E - can be any number

If column D is 1 or 3, then the VLOOKUP should look up column E and point to the answer in column 4 on another worksheet (Companies in this case). If column D is 2 or 5, then the VLOOKUP should look up column E and point to the answer in column 5 on another worksheet (Companies in this case). This is what I have so far, just trying to get it to recognize if it is a 1 or 2:

=IF(OR(D2=1,VLOOKUP(E2,Companies!A:G,4)),IF(D2=2,VLOOKUP(E2,Companies!A:G,5)))

What is making this not work? I'm getting a false. But before I added the OR, it worked for the D2=1.

View 3 Replies View Related

Nested 'IF' Statements

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

Nested Loops..?

Aug 11, 2009

I seem to be having trouble creating a nested loop. It seemed simple enough in my brain holder, however, in real life...Well I am here aren't I. Here is my

View 2 Replies View Related

Nested If Function

Dec 1, 2005

I am trying to create a nested IF function (has 5 IF statements), however,
every time I put the brackets at the end of the function, it puts a little .
next to the false answer, removes the brackets and comes up with an error
message?

This is only happening on one particular PC, when I create the same formula
on other pC's, it works fine so I know my formula is correct.

is there a setting on the PC that must be wrong?

View 14 Replies View Related

Nested IFs And VLOOKUPs

Feb 6, 2009

I have a simple Staff Rote which is fed by data on Time Sheet. Currently it is working ok with two definitions;

T : Time
B: Break

If I introduce a 3rd and 4th definition like;
A: Leave
X:non working day
formule will get even more complicated.

Is there a way of simpifying this with a code and introducing the new definitions.

View 11 Replies View Related

IF AND Nested Formula..?

Feb 20, 2009

I have a rather large formula that I put together and it's shown in column 'C' in the small sample file I have attached. I'd like to add one more criteria such that I avoid duplicate solutions in column 'C'. i.e. I only want the first occurrence of a group.

The formula works fine 'bucketing' the first entry. If I have an solution in C I want the formula to not give me another answer if the cell immediately above has an answer. In other words, rows 11 and 15 would be blank because rows 10 and 14 have an answer.

I've tried inserting another criteria in the AND statement, like ISBLANK for the cell above, but I can't get it to work. What am I doing wrong, OR is there a simpler solution?

View 2 Replies View Related

Nested, IF, AND, And OR Function

Feb 22, 2009

I have an assignment in which I have to use nested, IF, AND and OR functions. Does anyone know the syntax for this kind of function? Basically I have to determine leave time based on years of service and whether the employee is full time or part time. Part-time with less than 1.5 years of service = 0 days of leave Part-time over 1.5 and full-time under 1year = 3 days of leave and full time over 1 year = 5 days of leave. I know how to do a nested function, but I have not worked with both an AND and OR together.

View 10 Replies View Related

Nested If/or Functions

May 7, 2009

IF/OR function below is not working

=IF((OR(B14=1,2,3,12,15,16)),"A",IF(OR(B14=4,5,6,7,8,9,10,11,13,14,21,40,41,42,43,44,45,46,47,50,51, 52,53,54,55,56,59,60),"B",IF(OR(B14=20,30,57,58),"C",IF(OR(B14=33,31,32,34,35,22),"E F OR G",IF(OR(B14=36),G,"ERROR")))))

View 4 Replies View Related

Nested If: Compare One Value

Jul 25, 2009

Im using nested if to compare one value and if its true it should count the values in the specified column. I tried this formula...

COUNT(IF($C$8:$C$1000="Defect", IF($J$8:$J$1000 <>"Ignored",$A$8:$A$1000,""),""))

Im checking whether its a defect and if its defect thenchecking the status whether it is ignored if so im counitng the number of defects by counting s.no in column A.

View 2 Replies View Related

Nested IF Integration

Mar 31, 2013

I have the following formula in a spreadsheet:

PHP Code:

=IF(A6=Controls!$B$3,IF(AD6="CLEAR","CLEAR",IF(AND($AB$5>="5",$AB$5<="6",MyB!$J$2=0,$AA$5="0:0"),"BACK",
IF(AND($AB$5>="10",$AB$5<="11",MyB!$J$2=1,$AA$5="0:0"),"BACK",
IF(AND($AB$5>="15",$AB$5<="16",MyB!$J$2=2,$AA$5="0:0"),"BACK",
IF(AND($AB$5>="20",$AB$5<="21",MyB!$J$2=3,$AA$5="0:0"),"BACK",IF(OR($AA$5<>"0:0",$AC$5="HT"),"LAY")))))),"") 

I am trying to amend the final IF to the following but cannot integrate it correctly.

PHP Code:

=IF(AND(AE6="SETTLED",OR($AA$5<>"0:0",$AC$5="HT")),"LAY") 

View 6 Replies View Related

Nested For Each Next Loop

Feb 17, 2007

I think its something simple I'm missing here. I have a range of stock prices (Range("E3,E4,E5,E6")) what I'm trying to do is use for each next loop to calculate the number of shares that I could trade. and place those shares in a range of cells adjacent to its corresponding price (Range("G3,G4,G5,G6")). I think the problem is in my loop statements but I can't seem to find it . Could someone kindly show me the error in my ways.

Code: ...

View 9 Replies View Related







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