2 Column Data lookup

Hi,

I have data in column A, B and C starting from row number 2.

Also, I have some data in column P and Q starting from row number 2.

The data in A and B TOGETHER constitute a Unique ID. Similarly data in
P and Q together constitute a Unique ID.

Now based on the data in P and Q I want to look up A and B and return
value from C in column R.

As of now, I use an inefficient way of building up a helper column in D
(D2 = A2 & B2) and S (S2 = P2 and Q2). Then in R2 I write the formula,
= =INDEX($C$2:$D$1000,MATCH(S2,$D$2:$D$1000,0),1)

Is there a better way of accomplishing the above (an array formula or
some mega formula which doesnt resort to inserting dummy columns etc)

Please guide me.

Regards,
Hari
India

0
6/15/2005 6:03:01 AM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
432 Views

Similar Articles

[PageSpeed] 52

Hi!

Try this:

Array entered:

=INDEX($C$2:$D$1000,MATCH(P2&Q2,$A$2:$A$1000&$B$2:$B$1000,0),1)

Is it more efficient than using 2 helper columns? Maybe, maybe not! It 
depends!

Biff

"Hari" <excel_hari@yahoo.com> wrote in message 
news:1118815381.806043.289060@z14g2000cwz.googlegroups.com...
> Hi,
>
> I have data in column A, B and C starting from row number 2.
>
> Also, I have some data in column P and Q starting from row number 2.
>
> The data in A and B TOGETHER constitute a Unique ID. Similarly data in
> P and Q together constitute a Unique ID.
>
> Now based on the data in P and Q I want to look up A and B and return
> value from C in column R.
>
> As of now, I use an inefficient way of building up a helper column in D
> (D2 = A2 & B2) and S (S2 = P2 and Q2). Then in R2 I write the formula,
> = =INDEX($C$2:$D$1000,MATCH(S2,$D$2:$D$1000,0),1)
>
> Is there a better way of accomplishing the above (an array formula or
> some mega formula which doesnt resort to inserting dummy columns etc)
>
> Please guide me.
>
> Regards,
> Hari
> India
> 


0
biffinpitt (3172)
6/15/2005 6:46:41 AM
Hi Biff,

Thnx for the formula. Getting the idea.

Regards,
Hari
India

0
6/15/2005 6:54:27 AM
Reply:

Similar Artilces:

getdlgitemtext #2
Hi, I meke code from example behind, and not working corectly, buffor "String1" they are no my text in IDC_EDIT1 it is a somthing wrong this bufor, may please send me good idea. void CDialogPASS::OnBnClickedButtonDp2() { CString String1; GetDlgItemText(IDC_EDIT1, String1); } mike 1010 Is IDC_EDIT1 an actual control? I've seen this fail when the control ID changes due to editing of the dialog. joe On Fri, 30 Jun 2006 17:44:33 +0200, "1010" <mig1010@wp.pl> wrote: >Hi, > >I meke code from example behind, and not working >corectly,...

missing buttons #2
I just installed the new Office 2003 edtion. I went into e-mails and my send button and now my paper clip button are missing. I've checked in where you can add buttons but they're not in their either. What can I do to find them. Are you using Word as your e-mail editor? -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** In news:4E889BAD-E127-4AF8-BC98-7AB117D0B90B@microsoft.com, Sharon wrote: > I just installed the new Office 2003 edtion. I went into e-mail...

forwarding in Exchange 2003 #2
I configured the server (Exchange 2003) to forward a user��s emails to test@xyz.com. It is very strange that all messages sent from xyz.com are rejected (please see the sample NDR below), there is not problem to other domains. test@xyz.com did not receive the message while the envelope recipient (admin@abc.com) did. Does anyone know how to solve this? Any help would be appreciated. Thanks. SC -------------------------------------------------------------------------------------------------------------------------------------------- Your message To: admin@abc.com S...

2 Questions
Hi I run Win 2K with Excel 2K Question 1 I have some VB code in the "Sheet 1" module of my excel file. The code is as follows: Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Column <> 12 Then Exit Sub On Error GoTo ErrHandler Application.EnableEvents = False Target.Formula = UCase(Target.Formula) ErrHandler: Application.EnableEvents = True End Sub I would like this code to run automatically whenever the file is opened. (I am assuming that this would remove the enable/disable dialog box option when opening the file) Can someone tell ...

Disaster Recovery for CRM 1.2
Does anyone have any documentation on the steps to backing up CRM 1.2? We want to make sure we are backing CRM 1.2 up correctly if the server should go down. We were unable to find any documentation on Microsofts website for a step by step backup solution. Right now we are just backing the CRM databases using the scheduler in SQL; is this ALL that is required and if so do we backup ALL of the databases or just certain ones? The owners of the company want to make sure we can restore ALL of the data if needed. -- Thank You, Troy Hi Troy Microsoft have included details of backing...

Money 2003 restoring a backup asking for a password that does't ex #2
I have microsoft money 2003 at my work and would like to have the same data there in my home. So i made a backup, put on a pendrive and brought it to home. Installed microsoft money 2003 in my home and tried to restore this backup. Money 2003 insists asking a password that does not exist in the original backup file. I already tried to use the repair tool and didn't work. So, what i have to do to make the backup work and does not ask a password that does not exists? Thankyou sorry about the spam, i was using the google chrome and it bugged, sorry again about the tripple post :( "...

Multiple Outlook #2
I imported an Outlook 2000 pst file into Outlook 2003. Now when I open Outlook my Personal Folders appears 4 times in the left hand "All Mail Folders" When I close Outlook it gives me an error and msvbvm60.dll is mentioned. Any help on how to correct this issue would be greatly appreciated. Mick ...

queue stuck #2
HI... i ahve exchange 2003 and i am facing problem that i am getting lot junk email and all messagess are stuck in queue ..after that my server hang so i need to restart server and clear the queue before restart it does't allow me to clear the queue ... pls help me .. tejal ...

Trouble sending emails #2
I am recieving emails, but every time I try to send one I get an error message saying, "The server does not support the required HTTP methods. Ther server responded 'Not Implemented'." I have no idea wht that means or what I need to change. Help! On Thu, 30 Dec 2004 15:05:06 -0800, Tina wrote: > I am recieving emails, but every time I try to send one I get an error > message saying, "The server does not support the required HTTP methods. Ther > server responded 'Not Implemented'." I have no idea wht that means or what I > need to change. ...

hyperlinking to an item in Global Address List Options
I have had success linking via html from web page to opening a specific contact record from Microsoft Outlook. I have done it like this: outlook://Big%20Contacts/Contacts/~Peter%20Crawford However, my very large contact database also has people with basically the same name, like John Smith. In the current "Address Card" view inside Microsoft Outlook, one of the John Smith's is always sorted first. If I enter outlook://Big%20Contacts/Contacts/~John%20Smith the first John Smith in the sort order is always opened. However, I want to specify one of the other John Smith's....

Cannot open assigned task in Outlook 2003 #2
I am using Outlook 2003 on a XP Home PC. When a co-worker creates and assigns me a task, it comes into my Inbox and I can see it in my preview pane, but I cannot open it when I double-click it and I cannot accept or decline it thru the preview pane. My co-worker has Outlook 2003 on a XP Pro PC and has no problem opening and accepting tasks from me. By the way....when I attempt to open it, absolutely nothing happens that I can see....no error, no change of screens, nothing! I have ensured that when the co-worker sends the task, that they do NOT have "text only" set for me. THANKS...

display name #2
hi i have this problem: when i send a mail massage from an application by exchange 2003, in outlook i see the e-mail address (xx@mydomain .com) and not display name (Customer Care) how can i resolve it? Thanks An application should allow you to specify display name for sender. Does it send via SMTP or MAPI? Matrix_pd wrote: > hi > i have this problem: when i send a mail massage from an application by > exchange 2003, in outlook i see the e-mail address (xx@mydomain .com) and > not display name (Customer Care) > > how can i resolve it? > > Thanks -- Please re...

splitting one column into two columns ... not what you think
i have fixed column widths that can't be changed; nor can any other columns be added to the worksheet ... i've got data in one column that represents "results" ... within the results column though, i need two columns (starting directly below the "results" cell, one that reads "in range" and that other that reads "out of range" ... so: if i'm on [column a] [cell 1] i want: "results" ... in [column a] [cell 2] i want: "in range" AND "out of range" with a line down the middle. "text to column" is ...

double lookup #2
In Excel2000, I need help with the following formula: my data is arranged like this ( I can rearrange if needed).. joe pete sue rating 30 10 5 A 20 5 3 B 10 2 1 C I then have values for joe, pete, sue. I want to look up the name and then give me the rating. The numbers may not be exact. For example, I want the output to look like this ( with the formula looking up the rating) name amount rating (formula needed) joe 11 C pete 7 B sue 1 C Can someone please help me with the formula to fi...

Finding duplicates in column
Hi, I have Excel 2002 and have 6000 emails addresses in a column. How can I find if there are any duplicates in that column? Thanks rock Assuming the data is in column A, add a formula in column B of =IF(COUNTIF($A$1:$A1,$A1)>1,"Duplicate","") Cpy that down, then you can filter column B for Duplicate Sorry to be so newby Bob, but when you say 'copy' down, what exactly do you mean? I have entered the formula in B1 but.. Thanks rock Bob Phillips wrote: > Assuming the data is in column A, add a formula in column B of > > =IF(COUNTI...

Assign values for one column to another.
Hi I have in column T certain numbers and texts that that I require to assign a value to as below, in the adjacent column. Again any pointers would be much appreciated. Kind Regards Celticshadow T U 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 0 10 F 10 UR 10 U 10 R 10 S 10 L 10 P 10 PU 10 BD 10 D 10 Well, imagine that two-column table occupies cells Y1:Z20. Put this formula in U1: =3DVLOOKUP(T1,Y$1,Z$20,2,0) and copy down. Hope this helps. Pete On Oct 14, 4:26=A0pm, Celticshadow <Celticsha...@discussions.microsoft.com> wrote: > Hi > >...

How can I choose alternate rows in a column?
My requirement is to be able to create a column whose elements consist of difference between adjacent elements in a column, say column A. If I can choose alternate elements and create 2 new columns then I can just subtract the 2 columns easily. Huh? "pnair" <pnair@discussions.microsoft.com> wrote in message news:D47AD012-084B-49C6-8672-5067E8455D9E@microsoft.com... > My requirement is to be able to create a column whose elements consist of > difference between adjacent elements in a column, say column A. If I can > choose alternate elements and create 2 new colum...

Attachment Size #2
Hi ! Is it possible to block the adding of attachments in an=20 outlook client ? Or block the adding for attachments that=20 are bigger than 2 MB for example ? Can i get an error=20 Message or something ? (I think about an GPO or Registry=20 change or something else....) I have Users around here with Pop3 Outlook 2000 and=20 Outlook 2003 Clients. The Problem is that some of them are=20 trying to send Mails with Attachments with 300 (three=20 hundred!!) MB or something else like that.... Because they=20 don=B4t look an the size of their attachments. So the Mail is going through our WAN over ...

Column styles doesn't appear on the worksheet
Hello, one of my customers has changed the windows xp designs to its own. From this moment excel doesn't show the font color and the background color of a cell in the worksheet. Only in the print preview you can see the color settings of the cells. I'm not shure if this problem belongs to the changing of the windows xp designs, but from this moment it did occur. This occurs on new excel-documents and on existing ones. With another user account on the same machine the problem doesn't occur. I have reinstalled Office 2003 and even deleted user registry entries for Office...

Help ! formatting data to text
I am creating data in an Excel spreadsheet. I then want to get that data into a simple text email. I have some problems and questions... 1) how do I get the columns of data to line up evenly when I copy the data to email text ? Keep in mind I need to be in simple text format, not HTML or rich text. Every time I do this, all columns become chaos and are unreadable. 2) Is there a simple way to automate the creation of an email from an excel file ? this is less important to me. Thanks in advance WxMachine #1. I think it may have to do with what email client you use, too. I copy and ...

Covert v. 2000 -> v. 2.0
Heelo All after serious cooruption we recover dmb file with Ontrac tools to v. 2000 but application are for v 2.0 are is possible conversion to v. 2.0 thanks Ervins ...

how do i recover data in publisher
i have been entering addresses to set up a mail merge. i cllicked the "ok" button in the window and lost all data . can i recover it Look in a folder in My Documents named "My Data Sources". Publisher data is saved as .mdb(Access) file. Did you try selecting "Edit Address List" in the Mailings and Catalog menu (Tools)? -- Mary Sauer http://msauer.mvps.org/ "dee" <dee@discussions.microsoft.com> wrote in message news:690430F1-36DE-47EE-8B7D-DD12A096C075@microsoft.com... >i have been entering addresses to set up a mail merge. i cllicked ...

Importing Outlook data into Access 2003
I recently reinstalled Office 2003 and have encountered the following problem: I want to import my contacts in Outlook into an Access 2003 database. When I go to File/Get External data, there is no option to import from Outlook. In fact, the only choices I'm given are Microsoft Access, Windows Sharepoint Services, XML and ODBC databases. How can I enable the options I've had in past installations of Access? Thanks in advance, Pic Select Full install instead of typical Pieter "Pic" <compuBUTNOTTHIStoot@att.net> wrote in message news:uqqbh3t26icr6bo0httq2b6640b78pq56...

Using subtotals as single data entries
Sorry about the subject--I couldn't figure out how to describe it simply. I have a large file (16,000 records) of amounts billed by roughly 10,000 service providers. A number of these providers have multiple office locations, so each record is unique to a specific office location. In other words, a provider who billed from 3 different office locations will have 3 entries. Each provider has a unique provider ID number, which stays the same regardless of which office location he is billing from. I want to be able to subtotal the amount billed by each provider for all their office locations...

Hide columns if there are no entry's in column
Hi everyone, I have a workbook with multiple sheets. One sheet is a overview from all the sheets and had all dates in it. Is there a VBA to hide columns when there are no entry's in it? The code has to work when I open the sheet "overview" Hope someone can help me with it! Thanks in advanced! Regards Berry Berry, If you have a row that when blank would indicate which columns to hide, you could use On Error Resume Next Rows("1:1").SpecialCells(xlCellTypeBlanks).EntireColumn.Hidden = True HTH, Bernie MS Excel MVP <blommerse@saz.nl> wrote in message news:118...