Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI I on sheet 2 of an excel file I have
Name Age weight location paul 10 150 calif joe 8 90 az on sheet 2 I have paul joe need on sheet 2 paul 150 calif joe 50 az and would like to get the wieght and location for each and place them in cells within the same row as the corresponding name. and on sheet 1 I want to pull corresponding information. On sheet one I will only have the name and on sheet 2 the names can be located in different locations so just a =sheet2,C2 will not work because the data location is not static. I do not want to have to change the formula every time there is new data. Just wondering if there is a way that excel can list desired attributes on sheet on by just providing the name? Thanks -- Paul G Software engineer. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You want programming or will worksheet functions do?
In sheet1 enter the names down column A in any order. In B1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) Copy these down as far as you have names in column A..........I used 20 rows. Or use a Data Validation List dropdown in A2 with your list of names to pick from. Gord Dibben MS Excel MVP On Wed, 22 Aug 2007 13:20:01 -0700, Paul wrote: HI I on sheet 2 of an excel file I have Name Age weight location paul 10 150 calif joe 8 90 az on sheet 2 I have paul joe need on sheet 2 paul 150 calif joe 50 az and would like to get the wieght and location for each and place them in cells within the same row as the corresponding name. and on sheet 1 I want to pull corresponding information. On sheet one I will only have the name and on sheet 2 the names can be located in different locations so just a =sheet2,C2 will not work because the data location is not static. I do not want to have to change the formula every time there is new data. Just wondering if there is a way that excel can list desired attributes on sheet on by just providing the name? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Typo alert!
In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) should be: In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,4,FALSE) (copy|paste is dangerous <vbg) And to the original poster... Debra Dalgleish has lots of notes on =vlookup(): http://www.contextures.com/xlFunctions02.html Gord Dibben wrote: You want programming or will worksheet functions do? In sheet1 enter the names down column A in any order. In B1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) Copy these down as far as you have names in column A..........I used 20 rows. Or use a Data Validation List dropdown in A2 with your list of names to pick from. Gord Dibben MS Excel MVP On Wed, 22 Aug 2007 13:20:01 -0700, Paul wrote: HI I on sheet 2 of an excel file I have Name Age weight location paul 10 150 calif joe 8 90 az on sheet 2 I have paul joe need on sheet 2 paul 150 calif joe 50 az and would like to get the wieght and location for each and place them in cells within the same row as the corresponding name. and on sheet 1 I want to pull corresponding information. On sheet one I will only have the name and on sheet 2 the names can be located in different locations so just a =sheet2,C2 will not work because the data location is not static. I do not want to have to change the formula every time there is new data. Just wondering if there is a way that excel can list desired attributes on sheet on by just providing the name? Thanks -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave.
Gord On Wed, 22 Aug 2007 16:33:53 -0500, Dave Peterson wrote: Typo alert! In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) should be: In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,4,FALSE) (copy|paste is dangerous <vbg) And to the original poster... Debra Dalgleish has lots of notes on =vlookup(): http://www.contextures.com/xlFunctions02.html Gord Dibben wrote: You want programming or will worksheet functions do? In sheet1 enter the names down column A in any order. In B1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) Copy these down as far as you have names in column A..........I used 20 rows. Or use a Data Validation List dropdown in A2 with your list of names to pick from. Gord Dibben MS Excel MVP On Wed, 22 Aug 2007 13:20:01 -0700, Paul wrote: HI I on sheet 2 of an excel file I have Name Age weight location paul 10 150 calif joe 8 90 az on sheet 2 I have paul joe need on sheet 2 paul 150 calif joe 50 az and would like to get the wieght and location for each and place them in cells within the same row as the corresponding name. and on sheet 1 I want to pull corresponding information. On sheet one I will only have the name and on sheet 2 the names can be located in different locations so just a =sheet2,C2 will not work because the data location is not static. I do not want to have to change the formula every time there is new data. Just wondering if there is a way that excel can list desired attributes on sheet on by just providing the name? Thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, not sure I understand the formula but on sheet 1 in cell D4 I have the
name as (lastname,firstname,middleinitial) that I want to search on sheet 2 but the name is listed as first name,lastname,middle initial. On the second sheet I have columns as follows A B C D E lastname firstname position salary boss on sheet 1 I need the boss so I tried VLOOKUP(D4,SHEET2!E2,1,FALSE) which creates an error. I would like to search through 20 rows in column E I think the error may be because of the way the total name (lastname,firstname,middleinit) is combined into 1 cell on sheet 1 and they first and last names are listed in seperate cells on sheet2. Thanks. -- Paul G Software engineer. "Gord Dibben" wrote: Thanks Dave. Gord On Wed, 22 Aug 2007 16:33:53 -0500, Dave Peterson wrote: Typo alert! In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) should be: In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,4,FALSE) (copy|paste is dangerous <vbg) And to the original poster... Debra Dalgleish has lots of notes on =vlookup(): http://www.contextures.com/xlFunctions02.html Gord Dibben wrote: You want programming or will worksheet functions do? In sheet1 enter the names down column A in any order. In B1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) Copy these down as far as you have names in column A..........I used 20 rows. Or use a Data Validation List dropdown in A2 with your list of names to pick from. Gord Dibben MS Excel MVP On Wed, 22 Aug 2007 13:20:01 -0700, Paul wrote: HI I on sheet 2 of an excel file I have Name Age weight location paul 10 150 calif joe 8 90 az on sheet 2 I have paul joe need on sheet 2 paul 150 calif joe 50 az and would like to get the wieght and location for each and place them in cells within the same row as the corresponding name. and on sheet 1 I want to pull corresponding information. On sheet one I will only have the name and on sheet 2 the names can be located in different locations so just a =sheet2,C2 will not work because the data location is not static. I do not want to have to change the formula every time there is new data. Just wondering if there is a way that excel can list desired attributes on sheet on by just providing the name? Thanks |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul
For VLOOKUP you need a lookup value, a lookup array and a column within that array. First of all I would break the sheet1(lastname, firstname,middle initial)cell into into 3 columns using DataText to Columns so you can look for the actual value in a cell. I don't understand what you want returned and where on sheet1 from sheet2 Values from sheet2 returned to which cells on sheet1? Your original post had different data and layout. Changing examples in midstream is too confusing this old guy. You could send me your workbook if you want. Change the AT and DOT in my email address to send to me. Gord On Wed, 22 Aug 2007 15:12:01 -0700, Paul wrote: Hi, not sure I understand the formula but on sheet 1 in cell D4 I have the name as (lastname,firstname,middleinitial) that I want to search on sheet 2 but the name is listed as first name,lastname,middle initial. On the second sheet I have columns as follows A B C D E lastname firstname position salary boss on sheet 1 I need the boss so I tried VLOOKUP(D4,SHEET2!E2,1,FALSE) which creates an error. I would like to search through 20 rows in column E I think the error may be because of the way the total name (lastname,firstname,middleinit) is combined into 1 cell on sheet 1 and they first and last names are listed in seperate cells on sheet2. Thanks. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi thanks for the response. Do you know if this could be done in a macro as
well! -- Paul G Software engineer. "Gord Dibben" wrote: You want programming or will worksheet functions do? In sheet1 enter the names down column A in any order. In B1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) In C1 enter =VLOOKUP(A1,Sheet2!$A$2:$D$20,2,FALSE) Copy these down as far as you have names in column A..........I used 20 rows. Or use a Data Validation List dropdown in A2 with your list of names to pick from. Gord Dibben MS Excel MVP On Wed, 22 Aug 2007 13:20:01 -0700, Paul wrote: HI I on sheet 2 of an excel file I have Name Age weight location paul 10 150 calif joe 8 90 az on sheet 2 I have paul joe need on sheet 2 paul 150 calif joe 50 az and would like to get the wieght and location for each and place them in cells within the same row as the corresponding name. and on sheet 1 I want to pull corresponding information. On sheet one I will only have the name and on sheet 2 the names can be located in different locations so just a =sheet2,C2 will not work because the data location is not static. I do not want to have to change the formula every time there is new data. Just wondering if there is a way that excel can list desired attributes on sheet on by just providing the name? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a new sheet from specific data in existing sheet | Excel Discussion (Misc queries) | |||
Showing Specific Data from Master Sheet to Another Sheet | New Users to Excel | |||
How to Automatically transfer specific Data from Sheet 1 to Sheet | Excel Worksheet Functions | |||
Copying Data from one sheet to another sheet on a specific day | Excel Worksheet Functions | |||
Send data from userform to specific cell on specific sheet? | Excel Programming |