Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default How to get specific cell data from one sheet!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to get specific cell data from one sheet!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to get specific cell data from one sheet!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to get specific cell data from one sheet!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default How to get specific cell data from one sheet!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to get specific cell data from one sheet!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default How to get specific cell data from one sheet!

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a new sheet from specific data in existing sheet Rosscoe Excel Discussion (Misc queries) 2 January 13th 10 03:07 PM
Showing Specific Data from Master Sheet to Another Sheet Parker Jones New Users to Excel 1 July 10th 09 02:01 AM
How to Automatically transfer specific Data from Sheet 1 to Sheet Jman Excel Worksheet Functions 12 May 10th 07 05:35 AM
Copying Data from one sheet to another sheet on a specific day Gav123 Excel Worksheet Functions 0 May 1st 07 10:17 AM
Send data from userform to specific cell on specific sheet? JennLee Excel Programming 10 March 10th 07 02:55 AM


All times are GMT +1. The time now is 12:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"