Searching for an attay within a data set

Hi,

I have 3 cells that contain a set of values, the total of which will always 
be constant eg:
         A             B            C
1       0             2             1

I have a table populated with all possible combinations of these numbers:

0      0      3      n1
0      1      2      n2
1      1      1      n3
0      2      1      n4
etc. etc.

There is a fourth column to the right of this table with a set of 
unconnected (and not necessarily unique) numbers (n).

How can I search the full table for the single occurrence of the pattern in 
cells A B and C and return the value in column 4 - n4 in this case?

Many thanks

Dave  
0
RiskyDave (49)
3/1/2007 9:32:05 AM
excel 39879 articles. 2 followers. Follow

3 Replies
266 Views

Similar Articles

[PageSpeed] 1

Dave,

In D1 write something like this: Not Found

In an other cell place this formula:

=INDIRECT("D" & 1*(SUMPRODUCT(ROW(A3:A6)*((A3:A6 & B3:B6 & C3:C6)=(A1 & B1 & 
C1)))=0)+SUMPRODUCT(ROW(A3:A6)*((A3:A6 & B3:B6 & C3:C6)=(A1 & B1 & C1))))

But perhaps there is a more simple solution.

Jan



0
jg8091 (25)
3/1/2007 10:23:50 AM
Since your rows in your table are all unique combinations and since n1, ..., nx
are all numbers, you could use:

=sumproduct(--(a1=sheet2!a1:a64),
            --(b1=sheet2!b1:b64),
            --(c1=sheet2!c1:c64),
              (sheet2!d1:d64))

If the rows were unique combinations, but the n1, ..., nx were strings, you
could use something like:

(saved from a previous post)

If you want exact matches for just two columns (and return a value from a
third), you could use:

=index(othersheet!$c$1:$c$100,
   match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet!$b$1:$b$100),0))

(all in one cell)

This is an array formula.  Hit ctrl-shift-enter instead of enter.  If you do it
correctly, excel will wrap curly brackets {} around your formula.  (don't type
them yourself.)

Adjust the range to match--but you can only use the whole column in xl2007.

This returns the value in othersheet column C when column A and B (of
othersheet) match A2 and B2 of the sheet with the formula.

And you can add more conditions by just adding more stuff to that product
portion of the formula:

=index(othersheet!$d$1:$d$100,
   match(1,(a2=othersheet!$a$1:$a$100)
          *(b2=othersheet!$b$1:$b$100)
          *(c2=othersheet!$c$1:$c$100),0))


Risky Dave wrote:
> 
> Hi,
> 
> I have 3 cells that contain a set of values, the total of which will always
> be constant eg:
>          A             B            C
> 1       0             2             1
> 
> I have a table populated with all possible combinations of these numbers:
> 
> 0      0      3      n1
> 0      1      2      n2
> 1      1      1      n3
> 0      2      1      n4
> etc. etc.
> 
> There is a fourth column to the right of this table with a set of
> unconnected (and not necessarily unique) numbers (n).
> 
> How can I search the full table for the single occurrence of the pattern in
> cells A B and C and return the value in column 4 - n4 in this case?
> 
> Many thanks
> 
> Dave

-- 

Dave Peterson
0
petersod (12005)
3/1/2007 1:24:12 PM
Jan and Dave,

My thanks, these solutions worked a treat :-)

Dave

"Dave Peterson" wrote:

> Since your rows in your table are all unique combinations and since n1, ..., nx
> are all numbers, you could use:
> 
> =sumproduct(--(a1=sheet2!a1:a64),
>             --(b1=sheet2!b1:b64),
>             --(c1=sheet2!c1:c64),
>               (sheet2!d1:d64))
> 
> If the rows were unique combinations, but the n1, ..., nx were strings, you
> could use something like:
> 
> (saved from a previous post)
> 
> If you want exact matches for just two columns (and return a value from a
> third), you could use:
> 
> =index(othersheet!$c$1:$c$100,
>    match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet!$b$1:$b$100),0))
> 
> (all in one cell)
> 
> This is an array formula.  Hit ctrl-shift-enter instead of enter.  If you do it
> correctly, excel will wrap curly brackets {} around your formula.  (don't type
> them yourself.)
> 
> Adjust the range to match--but you can only use the whole column in xl2007.
> 
> This returns the value in othersheet column C when column A and B (of
> othersheet) match A2 and B2 of the sheet with the formula.
> 
> And you can add more conditions by just adding more stuff to that product
> portion of the formula:
> 
> =index(othersheet!$d$1:$d$100,
>    match(1,(a2=othersheet!$a$1:$a$100)
>           *(b2=othersheet!$b$1:$b$100)
>           *(c2=othersheet!$c$1:$c$100),0))
> 
> 
> Risky Dave wrote:
> > 
> > Hi,
> > 
> > I have 3 cells that contain a set of values, the total of which will always
> > be constant eg:
> >          A             B            C
> > 1       0             2             1
> > 
> > I have a table populated with all possible combinations of these numbers:
> > 
> > 0      0      3      n1
> > 0      1      2      n2
> > 1      1      1      n3
> > 0      2      1      n4
> > etc. etc.
> > 
> > There is a fourth column to the right of this table with a set of
> > unconnected (and not necessarily unique) numbers (n).
> > 
> > How can I search the full table for the single occurrence of the pattern in
> > cells A B and C and return the value in column 4 - n4 in this case?
> > 
> > Many thanks
> > 
> > Dave
> 
> -- 
> 
> Dave Peterson
> 
0
RiskyDave (49)
3/2/2007 9:35:05 AM
Reply:

Similar Artilces:

double clicking and draging a column in a chart to chg data
in Excel 2003, double clicking on a column in a chart and then dragging the column up or down would change the data in a table upon which the chart depended. How does one do this in excel 2007? Tom Hi, That feature has been removed in 2007, there is no way to do it. If this helps, click the Yes button. -- Thanks, Shane Devenshire "Tom of inns" wrote: > in Excel 2003, double clicking on a column in a chart and then dragging the > column up or down would change the data in a table upon which the chart > depended. > > How does one do this in excel 2007? &g...

Problems migrating BCM data into CRM SB edition
Hi There I am having a problem migrating data from Business Contacts Manager (BCM) into CRM 3.0 Small Business edition. I have downloaded the BCM data migration pack and have followed the data migration documentation to the letter. I even cleaned up the BCM database prior to copying the files, checking them for errors using the Manage Database option in the Business Tools menu. It gets so far through the migration process and then bombs out. Here is the final few entries from the log file: 28/10/2006 12:18:53------>Transitioning to next screen. From: ConfigurationSummary screen. To: ...

transfer data from multiple columns to singlr column
I have data in form a d g b e h c f i (but larger scale) and I need it in a single column going a to z. Hi, highlight you data, copy, go to the column where you want to see the data, paste special, transpose "lc85" wrote: > I have data in form a d g > b e h > c f i (but larger scale) > and I need it in a single column going a to z. You up for using a macro? Sub ToOneColumn() 'dantuck Mar 7, 2007 &...

Can't open 2005 data file after reinstalling Money 2005
I am experiencing a recurring problem. I have had to reinstall Windows XP and MS Money 2005. I am now unable to open my previously converted 2005 file or restore any backup version. I consistently get the following error message: "Money cannot locate filename or cannot open it, possibly because it is a read-only file, you do not have permission to change it, or your disk drive is write- protected. If you have chosen the correct file and it cannot be accessed, you will need to click OK and then Restore your most recent backup file." Any help or thoughts would be greatly ap...

.pdf save as settings
Hi, In Office 2007 Pro is there a way to change the settings such as preventing content copying etc. when saving a file to pdf? I have been trialling Open Office, alongside Office 2007 Pro (full version not a trial), which allows access to these settings but I can't see a way to do it in MS Office. -- Chas MS Office doesn't do that. Chass wrote: > Hi, In Office 2007 Pro is there a way to change the settings such as > preventing content copying etc. when saving a file to pdf? I have been > trialling Open Office, alongside Office 2007 Pro (full version not...

Web query timeout setting.
Dear Group, I fill an Excel table using data that I take from an Internet site. Unfortunately, this site is very slow and so I often get a "query did not provide any data" error message. How can I increment the default web query timeout limit? Thanks in advance, Enrico. ...

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...

Setting up a new e-mail account
I'm trying to set up my yahoo account so that I receive my e-mail messages in my Outlook Inbox. I went to Accounts, and servers, and put in mail.yahoo.com for incoming mail (POP3) and smtp.yahoo.com for outgoing mail (smtp). When I click on the send/receive button I get an error message. Dave <anonymous@discussions.microsoft.com> wrote: > I'm trying to set up my yahoo account so that I receive > my e-mail messages in my Outlook Inbox. I went to > Accounts, and servers, and put in mail.yahoo.com for > incoming mail (POP3) and smtp.yahoo.com for outgoing mail &...

I would like to know how to set up a 'fill in the blanks' form?
I would like to set up a templet of sorts to fill in the blanks for certificates. ...

Copying Data in a cell in one sheet to a cell in another sheet
I've run into a problem trying to copy data from a cell in one sheet to another. I have a spreadsheet called "rating" which contains a number of formula that calculates a final number. I also have a spreadsheet called "Final" that copies over the information from "Rating". In "Final", I'm trying to copy a number from "Rating" into a particular cell. I put in =Rating! G89, but it won't work. When I press enter, a window pops up "Update value:Rating". I press enter again and in the cell where I want the number ...

Customer check data
When customers pay by check RMS asks for specific information such as drivers license number, routing number, account number, address and phone number. Does anyone have a report and or a way to extract this info from the database for cases when the check is returned for NSF? Please advise, Scott We can write you this report. Contact me for detail on price . Afshin Alikhani - [ afshin@retailrealm.co.uk ] CEO - Retail Realm = = = = = = = = = = "Scott Santorio" <scott@tt-newyork.com> wrote in message news:e8ZKkR6$HHA.3716@TK2MSFTNGP03.phx.gbl... > When customers pa...

Macro to seperate data
Hi I seem to be struggling to find a macro that will work in previous threads. In sheet 1 is a list of data in columns A:N and the number of rows will vary. It is a list of sales with each sale record ocuppying one row. The salesperson's name is in column C and each salesperson will have multiple entries. What I am trying to do is create a seperate summary sheet in the workbook for each salesperson. Therefore sheets 2 to 20 are templates that already exist with a different salesperson's name entered into cell C3 on each of them. I am trying to find a macro that ...

Need HELP! for Linking data
Could someone please direct me to where I can learn how to link date in a work book. i.e., I have individual pages for each subject but I need the data that is entered in these individual pages to transfer to the Master page without having to manually in put it.........TNX Bubey, There are not too many bits about linking worksheets or workbooks that I can find. But have a look at the links below, in case they give you the information you need. I think it is frustratingly one of those things which is very easy when you know how, or if you can get someone to actually show you, but if you hav...

I want to add a mail account without setting a SMTP server. Is it possible?
I want to add a second mail account that is outside my company. Since the company firewall does not allow us to connect to SMTP-servers I want to add this account without setting the SMTP propertiy. I cannot specify the company server as it is an Exchange server and the outside one an IMAP one. Currently I have specified the outside SMTP server since outook does not allow me to add an account wihtout setting this. I keep getting annoying error messages as my computer can't connect to the outside SMTP. Any one know a way around this? cheers, mortb The company server has SMTP enabled, u...

Contacts Search
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Email Client: pop I recently deleted some vital Microsoft files, I reinstalled the package and my backup emails, contacts etc, the only problem is that if I do a quick search in contacts it brings up totally unrelated contact and not the contact I was originally looking for ?? On 1/31/10 4:01 AM, in article 59bb1f13.-1@webcrossing.JaKIaxP2ac0, "David_Marriott@officeformac.com" <David_Marriott@officeformac.com> wrote: > I recently deleted some vital Microsoft files, I reinstalled the package and > my backu...

Macro
I need a macro that help me to transfer name and address information from an specific table in excel to a template in words on specific areas and then print the word document. The reason for this is that i need to create diferents letters to be sent to the customers from the excel table. Example of the table is: soc seg, customer name, child name, customer code, add 1 , add2, city, estate, zip code. all this information will be paste on word letter template on specific areas or fields. Any suggestion!!! -- nicoro Hi IMHO the best approach would be to set up a mail merge documen...

macros entering data
How do I create a macro that goes to one cell then waits until I enter new data, then goes to another cell and waits until I enter new data etc? thanks How about something like sub Enter_Data() dim NewValue NewValue = inputbox("Enter the value for cell A1: ") range("a1").value = NewValue NewValue = inputbox("Enter the value for cell G2: ") range("g2").value = NewValue NewValue = inputbox("Enter the value for cell I8: ") range("i8").value = NewValue end sub ...

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...

Macro to change default setting on startup
I am in need of a macro that can change a default setting in excel and for it to run on startup The task is: Tools Options General Web Options Files uncheck Update links on save Below is the recording of the macro: With ActiveWorkbook.WebOptions ..RelyOnCSS = True ..OrganizeInFolder = True ..UseLongFileNames = True ..DownloadComponents = False ..RelyOnVML = False ..AllowPNG = False ..ScreenSize = msoScreenSize800x600 ..PixelsPerInch = 96 ..Encoding = msoEncodingWestern End With With Application.DefaultWebOptions ..SaveHiddenData = True ..LoadPictures = True ....

Cell with large amount of data not showing all data
I'm running Excel 97. I have a cell with 358 words (1928 characters with spaces). Word wrap is on for the cell. Only part of the text is displayed even though the cell is big enough to show everything. If I make the cell wider (wider than a page) more of the text shows but not everything. I tried a new worksheet with the same text and had the same problem. Is this a known issue with excel? Is there a solution? Thanks, Brad Left to its own devices, excel will only show about 1000 characters in a cell. But you can add some alt-enters (to force a new line within the cell) and see more s...

Search FRustration
Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: pop Someone sends me an email from: <br><br>Headshot Newsletter <jessesverito@verizon.net> <br><br>I talk the person on phone. I get their email. <br> I want to now delete them out of my newsletter folder. <br> I search the email and nothing comes up. Is it becuase <br> Headshot Newsletter preceedes the email? <br> What poor search fuction no? Spotlight would nail it. <br> anything I can do? On 2010-01-23 17:55:39 -0500, kevs12@of...

Start macro creating a mail with contact data and autotext
Hallo, I am working with an user form. The developing of that form started with Outlook XP with a lot of code inside for different buttons. I changed to Outlook 2007 and unfortunately the code of the form was not longer displayed. What I learned about this is that MS does not support to much code in the form (or maybe a bug). They also do not support any longer. I was sending this form to MS support but they told it is do much code inside and they do not know, why the code is not displayed. In Outlook 2003 the code is displayed as in Outlook XP. Because I do not know real...

find data and autopaste when found
Hi, Can someone help me how to do this : For checken the backorders of our customers we can extract a list fro our SAP system. this list is always different and shows us ever product per customer in Back order. ex. Customer A has product 1 en in backorder. This gives 2 lines in the xls file. can excel put th name of the customer on a form and it's backorders automatically. Ca it create for each customer showing in the list a new form? thanks koenraa -- Message posted from http://www.ExcelForum.com ...

Disappearing data in sync'd forms
I have a small sized text box in a form called frmMain. This text box may or may not contain a large amount of text. If the text box does contain alot of text I want to open up a new form called frmLargeText that contains a larger text box to allow the user to easily see and edit the large amount of text. I also need the two forms to stay in sync. i.e. if the user moves to a new record then both forms move to the same record. I thought I could do this by setting the recordset of frmLargeText to equal the recordset of frmMain as follows: Dim frm as Form_frmLargeText Dim rst As DAO.Rec...

Column searching problem
I have a worksheet called "net" containing the following: NETWORK AVG MIN MAX STD SAMPLES ABC 17.17 16.26 17.71 0.4469 19 CBS 12.99 11.69 14.56 0.6524 30 NBC 15.39 14.08 16.70 0.7323 38 NBC* 15.12 14.08 15.99 0.4910 31 Fox 10.63 9.07 12.09 0.9374 8 HBO 10.94 9.07 13.22 1.2507 19 Showtime 11.52 6.84 13.23 1.9017 11 HDNet 18.14 14.22 18.85 1.1619 14 HDNet* 18.45 18.13 18.85 0.2847 13 HDNet-Movies 1...