Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel spreadsheet functions

I am wondering if I could get some help or suggestions on how do do a
particular type of task.
The problem is that I don't know how to even google what I am trying
to ask because I am sure my question is not new.

I have several worksheets each has one common identifying number. But
the others have different information.

For example
Sheet1
a1=01234
b1=Fred
c1=Flinstone

Sheet2
A400=01234
b400=Ford
c400=Mustang

What I am trying to do is have Sheet1cell D1 search Sheet2 for the
corresponding value of sheet2 A:A and then populate Sheet1 D1 with the
value of Sheet2 B400

So the result will look as follows
Sheet1
a1=01234
b1=Fred
c1=Flinstone
D1=Ford

What is the proper term for what I am asking? function? script? It's
hard to search for answers to questions when you don't even know how
what you are asking.

Thanks for the time.

The other thing I have noticed is that usually when I paste the
information into a sheet (from a web page or import from csv) Excel
changes the value by dropping the leading 0

This is not a big problem but people are not used to looking at a
report and not seeing the leading 0 so I was wondering if there is a
way to get that the leading 0 is back in the columns.

Thanks again,
sebast
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Excel spreadsheet functions

You're looking for the VLOOKUP() function
Look here for a tutorial:

http://www.contextures.com/xlFunctions02.html

To retain the leading zero, for a fixed number of digits:
FormatCellsNumber tab, Custom, in the Type box, enter 0000 if you require 4 digits.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in message ...
|I am wondering if I could get some help or suggestions on how do do a
| particular type of task.
| The problem is that I don't know how to even google what I am trying
| to ask because I am sure my question is not new.
|
| I have several worksheets each has one common identifying number. But
| the others have different information.
|
| For example
| Sheet1
| a1=01234
| b1=Fred
| c1=Flinstone
|
| Sheet2
| A400=01234
| b400=Ford
| c400=Mustang
|
| What I am trying to do is have Sheet1cell D1 search Sheet2 for the
| corresponding value of sheet2 A:A and then populate Sheet1 D1 with the
| value of Sheet2 B400
|
| So the result will look as follows
| Sheet1
| a1=01234
| b1=Fred
| c1=Flinstone
| D1=Ford
|
| What is the proper term for what I am asking? function? script? It's
| hard to search for answers to questions when you don't even know how
| what you are asking.
|
| Thanks for the time.
|
| The other thing I have noticed is that usually when I paste the
| information into a sheet (from a web page or import from csv) Excel
| changes the value by dropping the leading 0
|
| This is not a big problem but people are not used to looking at a
| report and not seeing the leading 0 so I was wondering if there is a
| way to get that the leading 0 is back in the columns.
|
| Thanks again,
| sebast


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Excel spreadsheet functions

If Niek's solution is not what you want, then try this:


Sub fillColD()
Dim c As Range, f As Range
lastRow = Sheets(1).Cells(Rows.Count, 1).End(xlUp).Row
lstRw2 = Sheets(2).Cells(Rows.Count, 1).End(xlUp).Row
For Each c In Sheets(1).Range("A2:A" & lastRow)
Set f = Sheets(2).Range("A2:A" & lstRw2).Find(c.Value, LookIn:=xlValues,
LookAt:=xlWhole)
If Not f Is Nothing Then
f.Offset(0, 1).Copy Sheets(1).Range(c.Address).Offset(0, 3)
End If
Next
End Sub


" wrote:

I am wondering if I could get some help or suggestions on how do do a
particular type of task.
The problem is that I don't know how to even google what I am trying
to ask because I am sure my question is not new.

I have several worksheets each has one common identifying number. But
the others have different information.

For example
Sheet1
a1=01234
b1=Fred
c1=Flinstone

Sheet2
A400=01234
b400=Ford
c400=Mustang

What I am trying to do is have Sheet1cell D1 search Sheet2 for the
corresponding value of sheet2 A:A and then populate Sheet1 D1 with the
value of Sheet2 B400

So the result will look as follows
Sheet1
a1=01234
b1=Fred
c1=Flinstone
D1=Ford

What is the proper term for what I am asking? function? script? It's
hard to search for answers to questions when you don't even know how
what you are asking.

Thanks for the time.

The other thing I have noticed is that usually when I paste the
information into a sheet (from a web page or import from csv) Excel
changes the value by dropping the leading 0

This is not a big problem but people are not used to looking at a
report and not seeing the leading 0 so I was wondering if there is a
way to get that the leading 0 is back in the columns.

Thanks again,
sebast

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
Excel Spreadsheet Functions Beth Excel Worksheet Functions 3 July 11th 09 03:16 AM
excel spreadsheet print functions [email protected] Excel Worksheet Functions 1 May 5th 07 12:16 AM
Can I protect an Excel spreadsheet, and use Outline functions? jdmarsh Excel Worksheet Functions 2 June 24th 06 02:29 AM
Conversion from Spreadsheet Toolkit functions (ESSV....) to EssBase API functions sujay Excel Programming 0 June 5th 06 10:13 AM
Spreadsheet functions Paige Park Excel Discussion (Misc queries) 5 May 16th 06 08:41 PM


All times are GMT +1. The time now is 10:07 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"