Doing a VLOOKUP (probably using the INDEX and MATCH function), with both vertical and horizontal values in play.

I am trying to create a function that will pull in data from a 2nd
spreadsheet.  Typically, I use the index and match function to do so.

However, in this case, I am trying to do a lookup based on a value
above (i.e., horizontal) and a value to the right (i.e., vertical) of
the cell in which the formula will be placed.  Additionally, the sheet
from which I am pulling is similarly laid out.

To Provide an example.

Lookup Table

       Months (horizontal)   Jan  Feb   Mar Apr  Etc
Names(vertical)
Jeff
Eric                               5
Steve                                              8
John                                      4


Table with formula
         Months (horizontal)   Jan  Feb   Mar Apr  Etc
Names
Steve
Jeff
Dave
Eric

So the question is, what formula can I use in the "Table with formula"
to pull in the numbers from the Lookup Table?

Thanks very much for any suggestions!
0
Mike
12/10/2009 4:40:59 PM
excel 39879 articles. 2 followers. Follow

2 Replies
567 Views

Similar Articles

[PageSpeed] 12

You could do this with al slight modification to your lookup table and an 
embedded Hlookup to figure out what column# to return.

First add a row (you can hide it later if necessary) under the months to 
indicate the correct column number. It would look similar to this:

	Jan	Feb	Mar
	2	3	4
Jeff			
Eric	5		
Steve			8
John		4	

Then use a formula similar to this:
=VLOOKUP($A2,$A$28:$M$32,HLOOKUP(B$1,$B$26:$M$27,2,FALSE),FALSE)

Assuming the A2 is “Jeff” and A28:M32 is the table1 and B1=”Jan” and B27:M27 
is Jan-Dec with Row 2 as the Column # to return to the Vlookup.

Hope that helps.

Frank


"Mike C" wrote:

> I am trying to create a function that will pull in data from a 2nd
> spreadsheet.  Typically, I use the index and match function to do so.
> 
> However, in this case, I am trying to do a lookup based on a value
> above (i.e., horizontal) and a value to the right (i.e., vertical) of
> the cell in which the formula will be placed.  Additionally, the sheet
> from which I am pulling is similarly laid out.
> 
> To Provide an example.
> 
> Lookup Table
> 
>        Months (horizontal)   Jan  Feb   Mar Apr  Etc
> Names(vertical)
> Jeff
> Eric                               5
> Steve                                              8
> John                                      4
> 
> 
> Table with formula
>          Months (horizontal)   Jan  Feb   Mar Apr  Etc
> Names
> Steve
> Jeff
> Dave
> Eric
> 
> So the question is, what formula can I use in the "Table with formula"
> to pull in the numbers from the Lookup Table?
> 
> Thanks very much for any suggestions!
> .
> 
0
Utf
12/10/2009 5:32:01 PM
Assuming your lookup table is in Sheet1, then in cell B3 (I think,
from your example) of Sheet2 you would have this:

=3DINDEX(Sheet1!$B$3:$M20,MATCH($A3,Sheet1!$A$3:$A$20,0),MATCH(B
$1,Sheet1!$B$1:$M$1,0))

I've assumed you have data down to row 20, so adjust if necessary.
Then you can copy this across and down as required.

Hope this helps.

Pete

On Dec 10, 4:40=A0pm, Mike C <js2k...@yahoo.com> wrote:
> I am trying to create a function that will pull in data from a 2nd
> spreadsheet. =A0Typically, I use the index and match function to do so.
>
> However, in this case, I am trying to do a lookup based on a value
> above (i.e., horizontal) and a value to the right (i.e., vertical) of
> the cell in which the formula will be placed. =A0Additionally, the sheet
> from which I am pulling is similarly laid out.
>
> To Provide an example.
>
> Lookup Table
>
> =A0 =A0 =A0 =A0Months (horizontal) =A0 Jan =A0Feb =A0 Mar Apr =A0Etc
> Names(vertical)
> Jeff
> Eric =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 5
> Steve =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A08
> John =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A04
>
> Table with formula
> =A0 =A0 =A0 =A0 =A0Months (horizontal) =A0 Jan =A0Feb =A0 Mar Apr =A0Etc
> Names
> Steve
> Jeff
> Dave
> Eric
>
> So the question is, what formula can I use in the "Table with formula"
> to pull in the numbers from the Lookup Table?
>
> Thanks very much for any suggestions!

0
Pete_UK
12/10/2009 5:35:19 PM
Reply:

Similar Artilces:

What's happened to the findfirst function in Access 2010?
I have a working Access 2007 Application which is now failing miserably in 2010. It hinges on location the first available working document in a table runing the following VBA code: With Me.Recordset .FindFirst "([fld1] + [fld2]) = 0" If .NoMatch Then .FindLast "([fdl1] + [fld2]) <> 0" Exit Sub End If .... FURTHER PROCESSING ... What must I do to correct this? Go through a record by record search? End With In 2007, this works correctly, stopping at the appropriate record (approc. rec 1385 in the recordset...

visual basic
Hi, I trying to retrieve values from a table to calculate the 14days average value of a stock closing price. However, i encounter some problem as stated beside the code as follows: Function DaysAvgs() 'Calculate the average value of a given value. Dim db As DAO.Database Dim rst As DAO.Recordset Dim varBookmark As Variant Dim numAve, numDaysAvg As Double Dim intA, intB, lngCount As Integer Set db = CurrentDb 'Open Table Set rst = db.OpenRecordset("SGX Individual Historical", dbOpenTable) rst.MoveFirst Do While Not rst.EOF intA = 1 intB = 0 varBookmark = rst.Bookmark n...

Using mouse wheel in VB editor
Just tried using the mouse wheel to scroll within visual basic editor in excel but it wont let me. How can I turn this feature on. I am using Excel 2003. Thanks in advance. This is a known problem with the latest MS mouse drivers. You can either install version 4 of the drivers (current version is 5), or use FreeWheel, and freeware program at http://www.geocities.com/SiliconValley/2060/freewheel.html . -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "fullers" <fullers@discussions.microsoft.com> wrote in message ne...

Register & Favorites Don't Match
I have Money 2004. My checking account register shows the correct balance. But in the "Favorites" list on my home page, my checking account balance is many thousands of dollars lower than the actual balance. How did these get out of sync? Thanks for any help. In microsoft.public.money, Larry E. wrote: >I have Money 2004. My checking account register shows the correct balance. >But in the "Favorites" list on my home page, my checking account balance is >many thousands of dollars lower than the actual balance. How did these get >out of sync? Thanks for ...

Send to certain person using specific email account
I send an email to a certain receipient but don't want to use the default email account. Is it possible that when I send to them (plain text) , that it will choose the other account I want to use to send it? Please advise how I set this up. Thanks. I do not believe that this can be achieved automatically through standard use of Outlook as you need to manually specify the name of the account to send from if different than the default. However, it would be possible using the Outlook object model. An Addin would need to be developed that monitored each mail item prior to sending. If the d...

Vlookup returns "0"
I am using the following formula =VLOOKUP($A$1,'Data Sheet'!$A$11:$BH$15,3,FALSE and it is returning a zero if there is no data found in that cell. If there is no data found I would like it to display nothing. How can I do this? Carolyn, There are a couple ways so do this. One is to test it, which makes for doing the VLOOKUP function twice. 1) =if(VLOOKUP($A$1,'Data Sheet'!$A$11:$BH$15,3,FALSE)=0, "" , VLOOKUP($A$1,'Data Sheet'!$A$11:$BH$15,3,FALSE)) This gets a little messy. Better yet, and simpler is to hide the original cell (column, whatever), an...

IsOutLookClient() returns wrong value
IsOutLookClient() returns wrong value when both web client of crm and outlook client are running on the same workstation It looks like the same cookie(used for determining what client is running) is used by the sessions of each client. Look for "LightClient" in IsOutlookWorkstationClient() in global.js Oeps...I seem to have made a wrong assumption... Between the to clients IsOutlookClient() seems to work ok... But in outlook client the IsOutlookClient() function gives false for me...after I have opened a page from the Microsoft Crm folder structure... On another workstation it...

how to match the color of a button with its background?
Hi, I have a owner draw push button. I associate it with two bitmaps, one is down and the other is up. Is there a way to make the bitmaps's background color match the color of the window where the button is located. I manually choose the best matched color but still the result is not good. I can even see a white border line (not drawn by me) when the button is pushed. Please help. Thanks. Tony Check out http://msdn.microsoft.com/library/en-us/vcresed/html/_asug_choosing_an_opaque_or_transparent_background.asp May Young <tony@srac.com> wrote in message news:<408473...

Outlook 2007 Search always returns no matches
Any search I do in Outlook 2007's new search box returns no matches. I watched the Indexing Status as it progressed, and now it says "Outlook has finished indexing all of your items" But, searching on anything, even the word "The" or "a" returns no results. I'm searching all Outlook items. I'm on an Exchange Server via VPN. Anyone have any suggestions? I uninstalled Office and re-installed and the problem went away... "Tom" <none@none.com> wrote in message news:%23yGP6NPOHHA.2140@TK2MSFTNGP03.phx.gbl... > Any search I do i...

Use exchange from a trusted domain
Hi folks, I have domain a and domain b. Domain a is all set upp with exchange etc. Domain b was bought, and they don't have exchange. I have trust between the domains and file sharing and authentication are ok. What we want to do is, make users on domain b and let them use the exchange (on a seperate storage) on domain a. The users on domain b must logon to domain b, but need to have mailbox on domain a. Domain a are running on win2003 and exchange 2003. Domain are running on win2003 with forest and domain ready for exchange. Any advices? thanks in advance, - Bjarni Hi, Thi...

Qrp Date functions
Where do I find the various functions to modify the Reports like cast(DatePart(Dd,[Transaction].Time) as nvarchar) and others and what they mean???? Barry Found the information at MSDN Transact-SQL Reference Barry "Barry L" <barryl@eryanjewelers.com> wrote in message news:usd3uP1CIHA.1188@TK2MSFTNGP04.phx.gbl... > Where do I find the various functions to modify the Reports > like cast(DatePart(Dd,[Transaction].Time) as nvarchar) and others > and what they mean???? > > Barry > ...

Using Access 2003 on client to see Sharepoint 2007
Testing a Sharepoint environment and I can easily manipulate and run the database from Access 2007, but when I try to use Access 2003 it wants me to save the database to a location. The Access 2003 has the compatiblity pack, but it seems to not work when I download it. So the question is using Sharepoint 2007 and posting the Access 2007 format to it, can a user go to the sharepoint site and use a 2003 Access database that has the compatibility pack and open without having to download it? -- Message posted via http://www.accessmonster.com Send check for $500.00 to: David A Jenn...

changing values of one field based on another
How can I best change the values of one field in a table based on values of another field of the same table. We have an existing table of thousands of entries and I would like to use the following logic to populate a new boolean field. If field1 = "Done" Then BooleanFieldCompleted = True I have some Excel VBA experience but limited Access. I dont want to do this manually! Any assistance appreciated. In general, you'd use an Update query. However, in this case I don't see why you'd need such a field. Why not just create a query with a computed field that returns True...

Some Excel formatting functions taking a long time to work #2
Excel 2000 SP3 When I use some formatting functions for the first time in a session, such as bold, increasing font size etc, it takes up to 30 seconds to work. Meantime Excel is locked up until it completes that formatting call. I suspect faulty DLL? Has anyone experienced this? How to fix (other than a complete re- install) ? Any advice appreciated. Piri On Nov 5, 8:39=A0am, Piri <wiremu.pare...@hotmail.com> wrote: > Excel 2000 SP3 > When I use some formatting functions for the first time in a > session, such as bold, increasing font size etc, it takes =A0up to 30 > secon...

How to add a button to restore all altered cells original values?
I want to add a reset button to an excel spreadsheet that will restore the values of all changed cells to the original saved ones. Any help would be appreciated. Thanks Dawn Hi this would require quite some VBA code as you somehow have to store the original values for example on a separate hidden sheet -- Regards Frank Kabel Frankfurt, Germany "Dawnybros" <Dawnybros@discussions.microsoft.com> schrieb im Newsbeitrag news:3340601E-16EE-4296-8F50-B0BAC18EA387@microsoft.com... > I want to add a reset button to an excel spreadsheet that will restore the > values of all ...

How Use ShellExecute with a CMemFile
Hello, I need to store files of various types (such as .doc, .xls, .jpg, .pdf, ..wmv, ...) in a database. Upon retrieval of such a file I have the file as data in memory in a CMemFile. I need to then "display" the file in the aproriate application. If I were to write the CMemFile to disk and create an actual file I could then, of course, use ShellExecute() to launch , say Word to display a .doc file. However, I would much prefer to avoid the overhead of writing the data to an actual file and then dealing with having to detect when the User is done and cleaning up the file I had ...

Can i use conditional formating on a cell when it contains a formula?
I am trying a "conditional formatting" on a cell that contains formula, but it didn't work. "If cell value is equal to 0 then font - white" This doesn't work, stays always. If i use this condition on a cell without formula it works just fine. Thank -- si ----------------------------------------------------------------------- sit's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=262 View this thread: http://www.excelforum.com/showthread.php?threadid=26784 Hi are you sure your formula returns an exact zero?. Could you post the formul...

Adding a Macro to a VLookup Function
In Excel 2000 -- I would like to create a summary spreadsheet (sheet2). For each time that "Name" appears in sheet 1, row *, take information from the same row, but columns 2 and 6 and bring it over to sheet 2 in the designated area. I know that you need to do a "VLookup" function and I got that to work. I know that you also need a "Loop" statement, so that it will continue to perform the Vlookup and bring over the information for each time that the name appears. I don't know how to write the formula so that the VLookup and the Loop are combined. Examp...

Using INDIRECT within functions
I learned a bit from JLathman in a previous post but tried to use the same methodology with this formula (also learned from this Group to get the last entered value in a column) without much luck. The original formula was this with 2009 sheet being static: =LOOKUP(2,1/('2009'!H3:H65536<>""),'2009'!H3:H65536) Trying to make it dynamic I tried the following without success: =LOOKUP(INDIRECT("2,1/(" & O1 & "!$H$3:$H$65536<>"")," & O1 & "!$H$3:$H$65536)")) Did I miss something or are...

Date function quit working
Hi, I have an Access 2002 application that I have been running on Windows XP SP2 without issue. I just installed the application (running in Access Runtime) on a Windows Vista Home Premium machine. Now, anywhere I used the =Date() function, it fails and just shows #Name? I also have a subform on one of my forms that has now gone blank. It also uses the date function. I had this problem when I converted to Windows XP several years ago and updating the OWC10.dll to version 6619 fixed both issues. However, everything I have read says that reference file makes no difference to the Access...

total group & max function
I am using Access 2003 I created a Db for Machine Mtce. The table consists of 3 tables, (1) Basic Mach Infor (ie Mach#, Mach Name, Mfg etc) - (2) Operations Table - consists of different prev mtce (PM) that need to be completed at various time frames. Ex: "Mach 100" could have 3 different operations; Oper # 100A to change the oil due every 90 days, Oper # 100B to check the belts due every 180 days, Oper # 100C to grease the machine due every 365 days. The 3rd table is the "PM History" table which includes the history of all of the PM's completed with Work Order...

How do I convert a concatenated value into a know value
Hi all I am trying to get the results of a multiple input table, which get concatenated, read out as usable values eg. If the concatenated values are for example *llbbt* , I need this t be read as Simon, or *lbttd* must result in Fred etc... I will attact the spreadsheet. Thanks Colli Attachment filename: book3.xls Download attachment: http://www.excelforum.com/attachment.php?postid=54116 -- Message posted from http://www.ExcelForum.com You are probably better off by describing your problem, most regulars won't open files.. -- Regards, Peo Sjoblo...

Value is BLANK
In a form i'm working on i've asked this question before and i'm unable to locate the replies, but in one cell I have a date to be enter and in the other cell it takes that date and add 5 days to the date to give me a due date. But if no date is enter then I want to to remain blank insted giving me a date. Say that the date is to be entered into A1, then enter this formula into the "other" cell: =IF(A1,A1+5,"") -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ==================...

Function to determine Directory Size
I'd like to be able to determine the size of a directory or group of files. Does anyone know of an add-in that has a function whereby I can specify a path and get the size of directory of groups of files as the return value? Ex: =dirsize("C:\Documents and Settings\Bob\My Documents\School") =dirsize("C:\Documents and Settings\Bob\My Documents\School\*.doc") It would also be helpful if there were an option to include subdirectories. -- Thanks, Bob Chmara Argh.... Make that "get the size of a directory or group of files" Bob "Bob Chmara" fatfing...

RE: Fill Factor on a clustered index
Tricky one. Have a database getting alot of locks...Darn sql server and those silly page locks. Anyway had to change the application to use a disconnected methodology and check for changes before doing an update. Love the asp.net alternative. It just clobbers data (unless you write code to check)...record locks have their uses but...right now need to reduce any locking possible and one article on the web mentioned even tables where you just add data too could do with a fill factor. One table just keeps a track of changes by the record id. There is a clustered index on the record ...