Formula For MAX Value And Lookup Query?

May 8, 2012

I have been struggling with what seemed at first like a very simple formula. I have the sample data as shown below and I am trying to work out a formula that provides the latest value in sheet 2 from sheet 1 column AF based on a number of conditions.

If Sheet2 A1:A500 = Sheet1 F1:F500
And Sheet1 G1:G500 = max & Sheet1 AF1:AF500 doesn't = blank (i.e. last value in column AF)
Then return adjacent value from Sheet1 AF1:AF500

Sheet 1
F-----G-----AF
127--1-----15.6
127--2------3.1
128--1------2.0
128--2-----
129--1------2.5
129--2------1.6
129--3------2.7
130--1------3.3
130--2------3.1
130--3------1.6
130--4------5.4
130--5------
130--6------

Sheet 2
A--------B (desired results)
127-----3.1
128-----2.0
129-----2.7
130-----5.4

View 8 Replies


ADVERTISEMENT

Advanced Lookup Query (?)

Apr 14, 2009

I know we have the V and H lookup functions but... what I had invisaged for my colleagues sheet to do was to have excel look down the column (V) and at the same time across the rows (H) to return a value but in the same formula (a bit like school times table grid squares).

i.e. for 7 * 8 it would scan the left most column for the number 7 then at the same time, pan the first row for the number 8 and see where they met (for standard simpleness, column A is labelled 1-10 and row 1 is labelled 1-10, so the result for 7*8 would be in cell H7)

View 3 Replies View Related

Dropdown List-lookup-graph Query

Dec 8, 2009

Here's the skinny: From the front page you select a 'heading' from drop down list

example of data:

Heading 1
data a
data b
data c

Heading 2
data a2
data b2
data c2

The problem i'm having is that the resulting graph only plots the bottom line of data (i.e. 'data c') instead of all 3. Ani ideas why/work arounds?

View 9 Replies View Related

Lookup Query - Occurrences: Create Another Worksheet With The Months Of The Years Listed Down Column

Oct 16, 2008

I have a table that lists the months of the year down from cell A2:A13, and days of the week along row from cell B1:H1. The data in between (cell B2:H13) is pulled through from elsewhere in the workbook and is in number format.

What I basically want to do is create another worksheet with the months of the years listed down column A, and in column B, for each month, I want the first day of the week where the value in the original table is more than zero, and in column C the second day of the week where the value is more than zero. I really hope that makes sense, was quite difficult to explain!

View 2 Replies View Related

[SORT OF ]VLOOKUP Formula Query

Aug 31, 2009

I have a problem with the VLOOKUP function and i can't work out what is going on. I've attatched file. On the members sheet in cell F9, the result should equal 13.2, but the formula throws out 13.0. The final VLOOKUP seems to be the problem. The lookup value is F8(which is 13.4), the table array is named 'calc'(on the tables sheet), and column index number works out to be 3. The figure in column 3 is 13.2, yet it throws out 13.0!

View 4 Replies View Related

Altering Formula To Read An <= Query

Sep 4, 2007

In cell AD17, I have a formula that returns the number of days or draws(Skips), since the number in cell AD2 has been drawn. The following cells AD18.......... returns the next skip and continues untill all the hits( AD3), are accounted for. My question, Can the formulas be altered to read a "

View 9 Replies View Related

If AND Formula Using Hours And Minutes - Query

Jan 23, 2009

I am trying to write a formula that will take the value of cell J9 which is in hours and minutes format (hh:mm) and return a value in £.
ie. if J9 5hours and 12hours £15.00

I used this
=IF((J9)5,(J9)24,(J9)>24),15,))) returns #Value!
It won't work as it won't accept the hours and minutes format in J9. If I maually enter a value in J9 like 7.00 it returns the correct £12.00

View 9 Replies View Related

Lookup Formula With Two Lookup Values

Nov 12, 2008

I have 3 Sheets named Paid, Rejected, and Reprocessed.

On the Paid and Rejected sheets I have 2 fields Customer # (Column A), and Amount (Column Q). (The customer # field has many duplicates but the amounts are never duplicates)

On the Reprocessed sheet I have all the rejected items (all fields) and also a field named Reprocessed. I need to use a formula that will check the Paid sheet for any items that have the same Customer # and Amount and return the amount

There are 8,216 rejected items and 45,047 paid items. Some items were originally rejected have been reprocessed and show under paid.

Any thoughts on which formula I should use?

View 10 Replies View Related

Rounding Conversion Related Formula Query

Nov 29, 2013

I would like to round the weight as per the matrix below. I have tried to put formulae in Column B but it is not yielding the desired result. Formulae in Column C which can convert the data to the desired result?

Sheet1

*
A
B
C

1
Weight
Result With My Formula
Desired Result

2
0.56
1
0.5

[Code] .......

Spreadsheet Formulas

Cell
Formula

B2
=CEILING(A2,0.5)

[Code] .......

View 9 Replies View Related

Pass Parameter From Excel Through MS Query To MS Access Query

Nov 26, 2012

I have an MS Access query that contains a parameter. The parameter is a date field, and I have configured that in the Access query. If I run the query within the MS Access user interface, it prompts me for the paramater value as expected, and runs just fine. However, I want to connect to this query from within Excel as a data source.

I have created a connection to the Access file using ODBC from within Excel. In the MS Query window, I am merely selecting all of the fields resident in the MS Access query, and returning all values. In other words, there is no selection criteria in the MS Query. I have done this many times with Access queries that DO NOT contain a parameter, and everything works fine. However, in this instance, I need to pass a parameter through to MS Access in order for the query to run. At the moment, I get the "Too Few Paramaters...1 expected" error message. This makes sense, because I haven't figured out how to pass the paramater to MS Access.

Is there a way to structure this that does not involve VB code? If so, I'd love to know how. I have tried creating parameters in MS-Query with the same name, but although I get the prompt it doesn't connect with the Access query as the source for the parameter value.

If the solution requires using code, I'm good with VB Code in Excel...is there VB for Excel code that could make this happen?

Failing that, I guess there must be (I've seen a few in my search thus far) Access VB Code that can make this work. I'm very rusty using VB with Access, so this is my least favored solution. However, if this is the only option, keep in mind that I need to pass the paramater ultimately from a user who will initiate the process using Excel.

View 3 Replies View Related

Query Parameters Which Takes The Date From The Cell Into The Query

Mar 29, 2007

Need the query parameters which takes the date from the cell into the query. How should I modify my query if it needs to take the date from a cell?? The bold one date should be picked from one of the cell in sheet 2.

My query is this
WEB
1
http://fc-web-phl1-101.phl1:8090/gp/...runReport.y=12

Selection=15
Formatting=None
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False

View 2 Replies View Related

Lookup Formula: Find The Longitude And Latitude Data From My "lookup" Sheet

Jan 28, 2009

In my workbook I have multiple sheets but I'm attaching a very simple workbook to demonstrate what I'm trying to accomplish. In my "Lookup" tab/sheet. I want to have known Latitude and Longitude data that will exist in columns A&B. Columns C & D will have address numbers and Street Name. I would like my lookup formula to find the longitude and latitude data from my "lookup" sheet, when the matching address information is typed in, in my 2009 sheet. I have to keep the street numerics and street name separate on this worksheet as well. I believe I'll need two separate lookup formulas as I need these formulas to start in cell G4 & H4 in my "GeoCoding1" sheet. Is it possible to have four columns of data to be viewed in a lookup formula? I tried this formula in cell G4 (GeoCoding1 sheet)

View 3 Replies View Related

Create An Conection With MS QUERY To A Csv And Query Data

Sep 6, 2008

I have a csv file on another drive on the network that i need to query. I believe that ms query would be the best way. I know that a DSN needs to be setup but this macro will be used by various users who wont know how to do that. thus I would like to create one via VBA every time the task needs to be run.
I haven't a clue how to do this and i need it to be explained to me in general terms with words of one syllable!

View 9 Replies View Related

Query An Access Query With VBA Function

Jul 8, 2008

I'm trying to query a query in Access 2003, from Excel 2003.

The query in Access looks like:
AccessQuery: [SELECT VBAFunction(field1) FROM Table]

The query in Excel looks like:
ExcelQuery: [SELECT * FROM AccessQuery]

I use the following VBA code in Excel to excecute the query:

With ThisWorkbook.Worksheets(cDataSheetName).QueryTables.Add(Connection:=strConnection, _
Destination:=ThisWorkbook.Worksheets(cDataSheetName).Range("A1"), Sql:=strQuery)
.RowNumbers = True
.Refresh BackgroundQuery:=False
iResultRowCount = .ResultRange.Rows.Count
End With
When I execute this code I get the error message 'SQL Syntax Error' (Error 1004). When I remove the VBA function from the query in Access, it all works fine.

View 9 Replies View Related

Edit Query Using Query Wizard

Apr 25, 2006

I created an Ms Excel Database Query to bring in data from MS Access. (versions 2002 of MS Excel and Ms Access). The query works fine initially. I can right click, choose Edit Query and change my criteria. Results are returned almost instantly.

My problem is that, once I save the workbook, or autosave happens, I get an error when I right-click to Edit Query: This query cannot be edited by the Query Wizard..

View 2 Replies View Related

MS Query - Parameters (parameters On A Query But Use A Wildcard To Return All Instances)

Nov 17, 2009

Is it possible to set parameters on a query but use a wildcard to return all instances? I have a query that I want to be able to set multiple parameters on but give the user the ability to select as many or as few parameters as they want to see. 2 of the parameters are number fields and 2 are text fields with no spaces.

View 4 Replies View Related

Using IF LOOKUP SUM And AND In One Formula?

Jan 30, 2014

Why this below formula is giving me a #N/A result when entering 'Motorcycle', '4x4' or 'SLR' into cell H2?

=SUM((LOOKUP(F2,{0,"Standard"},{0,8.99}))+(LOOKUP(H2,{0,"SLR""motorcycle","4x4","Standard"},{0,12.99,9.99,10.99,8.99}))+((LOOKUP(K2,{"Acrylic","Aluminium"},{0,7}))*IF(AND(E2="Y",G2="Y"),2,IF(AND(E2="Y",G2="N"),1,IF(AND(E2="N",G2="Y"),1,0)))))

If there is an error?

View 12 Replies View Related

Lookup Formula

Jun 20, 2007

does anyone know if there is an easy formula to have a cell (h18) copy another cell (J2) if the value in a cell (h17) is greater than the last value entered in the row (17), and if it is not greater than the last value, or if there is no other previous value, to copy cell (K2)

View 14 Replies View Related

IF Formula? IF Then? Should It Be Lookup?

Jan 12, 2009

I am using the following formula to look up data from a seperate sheet and cannot get it to work. all three numbers are on the seperate sheet ... some show correct and others show not there when they are,

EXAMPLE
DATA
A B
99993728569820 you found it!
99993728569820 no
99993767688837 you found it!

FORMULA
{=IF(A3=Sheet1!A:A,"you found it!","no")}

View 2 Replies View Related

Vba On Lookup Formula

Jun 18, 2007

Is it possible to have a macro on vlookup formula? Tried the below code but the lookup result is not what it should be. I know this could easily be done a keying in the lookup formula without using code. But it would be faster if it could be done by using a macro.

Dim c As Range
Sheets("Data").Select
For Each c In Range(Cells(1, 1), Cells(Rows.Count, 1).End(xlUp))
c.Offset(0, 1).Formula = Application.WorksheetFunction.VLookup(Cells(1, 1), Sheets("Master").Range("A1:B10"), 2)
Next c

View 6 Replies View Related

Formula To Lookup And Interpolate

Jun 8, 2007

I got a table of two columns (A1:B6). One column (A1:A6) got temperature values and the other column (B1:B6) got enthalpy values as a function of temperature values as shown in the attached file. All values in the table are empirical values and I am trying to use them to obtain the enthaly (B11:B21) for my own temperatures (A11:A21).

I can use VLookup formula to do so but it won't be accurate because the enthalpy values are very sensitive to temperature changes. I need to use table A1:B6 and interpolate for temperature values that are located in between the integer temperature valuse. e.g. if the temperature=1.5 (between 1 and 2 in the table), how can I obtain the enthalpy value=15 (between 10 and 20) using the table.

View 9 Replies View Related

How To Arrange Lookup Formula

May 13, 2014

How to arrange a lookup formula.

Book2.xlsx

In this example, I am attempting to look up one value based on two criteria. The month must match, and the location must match. In doing so, the value "1" should be returned in the example.

View 3 Replies View Related

How To Lookup A Value And Return A Formula

Apr 6, 2009

I have rows with text and numbers. In order to ensure that the numbers are accurate, I have a "QC formula" that calculates a check using all of the numbers from 1 row. The challenge is that the "QC formula" needs to vary depending on a text value within the row.

How can I lookup up the text value and then return the correct active formula for that row? I have too many differet text values to do a nested If statement. see simplified example below.

Condition ABCFormula' Needed based on Condition
Red123A*B*C
Blue123A+B+C
Green123(A+B)*C

View 13 Replies View Related

Lookup Counting/Sum Formula

Oct 6, 2009

A B
1 2
1 3
1 2
2 3
3 2
1 2
2 1

Im trying to work out a formula that will look down Column A for the number 1 and then will count the number of times the number 2 appears on the same row as number 1 in Column B. The answer I should be getting is 3.

View 3 Replies View Related

Using Two Lookup Values In One Formula

Oct 28, 2009

I am trying to calculate a value by using two lookup statements in one formula. However, I get either #N/A, or very wrong results. Here is the formula:

=LOOKUP($B26,GrapePricing!$A$2:$A$15,GrapePricing!$B$2:$B$15)*
LOOKUP($B26,$B$5:$B$17,$D$5:$D$17)

What I need is to get the value in B26 (it is text, "Merlot"), go to the GrapePriceing sheet and find Merlot in range A2:A15, get the price of Merlot from the GrapePricing sheet range B2:B15, then multiply that by the matching value in the D5:D17 range.

View 5 Replies View Related

LOOKUP And Nesting IF Formula

Aug 3, 2009

The enclosed spreadsheet includes a couple formulas I’m having trouble with.
The questions themselves are detailed in the document.

View 7 Replies View Related

Formula To Lookup Value In Another Workbook?

Feb 23, 2014

I need a formula to look up the value in another workbook. I have a number of workbooks that have a list o competitor's names and their scores The competitor names are not in the same order in each workbook. I have created a master workbook to extract the score from each workbook. I need the formula to match the name in another workbook and then pick up the score cells to the right.

View 4 Replies View Related

Negative Value Lookup Formula

Sep 19, 2007

Possibly to combine If statement and lookup stmt. I have a spreadsheet that calculates principle, interest, and combined pmt amount based on certain amortization and payment frequency. In one cell I would like the expiry date to pull in (the expiry date would be the date that the fund balance would be at zero ie. all payments have been made and principle is nil). I am trying to make a formula that will search down the payment column and when it sees a negative number or zero, it will fill in the expiry date (which is in a second column) that is attached to that figure.

View 9 Replies View Related

DATE Formula LOOKUP

Dec 3, 2008

I have the following:

"ClosQtr" = 8034 (Closqtr is a named range cell)

As a named range cell "Curr_Mth" changes (which can take end of month values from 30Jun08-31Dec09 only),

I would like A2 to be:

ClosQtr+1 "Curr_Mth"=30Jun08
ClosQtr+1 for 30Jun08

View 9 Replies View Related

Lookup Formula In Macro

Dec 26, 2008

I need to know how can I code a Lookup formula in a VBA.

In Sheet1 of excel, I have several records of data in column A to E.
I have designed a userform, in which user enters data of column A in a textbox and on click of a button, it writes the textbox value in Sheet2.

I need to code a formula in VBA, so that column B and E of Sheet1 data is written in column B and C respectively of Sheet2 (corresponding data of textbox value).

View 9 Replies View Related







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