Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Importing data from another workbook

I have an Excel Project to do as part of my work, here is th
situation:

I need to make a commission calculator known in the workplace a
"Doshometer" I need to spreadsheet to be able to pull information fro
another spreadsheet for example:

If i enter a product code i want the spreadsheet to automatically pul
the Discription, price and commission from another spreadsheet, so b
just entering the product code the main spreadsheet will automaticall
fill in the rest of the information.

Sounds complicated i know but i only have six week to produce a workin
Doshometer. Can you excel guru`s help me out of a hole

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Importing data from another workbook

You should be able to do this using the Vlookup formula or a combination of
Index and Match. You would use Vlookup if the left most column in the
source table contains the product code (or it is at least to the left of the
information you want to retrieve).

Use of Vlookup is explained pretty well in Excel help.

--
Regards,
Tom Ogilvy

"Misterxpro " wrote in message
...
I have an Excel Project to do as part of my work, here is the
situation:

I need to make a commission calculator known in the workplace as
"Doshometer" I need to spreadsheet to be able to pull information from
another spreadsheet for example:

If i enter a product code i want the spreadsheet to automatically pull
the Discription, price and commission from another spreadsheet, so by
just entering the product code the main spreadsheet will automatically
fill in the rest of the information.

Sounds complicated i know but i only have six week to produce a working
Doshometer. Can you excel guru`s help me out of a hole.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Importing data from another workbook

You could use the Find object, and a little code to set up the Find.
(assuming a description is in column 5 on the worksheet)

Sub FindItem()

Dim strSheet As String
Dim iRow As Integer

strSheet = ""
iRow = -1

If FindInSheets("ABC", strSheet, iRow) = True Then
strDesc = Worksheets(strSheet).Cells(iRow, 5)
'...
'...
End If

End Sub


Function FindInSheets(strText, _
strSheet, _
iFoundRow) As Boolean
'strText - text to find
'strSheet - sheet name on return
'iFoundRow - row on sheet where found

Dim sht As Worksheet
Dim c As Object
Dim irow As Integer
Dim icol As Integer
FindInSheets = flase
For Each sht In Worksheets
sht.Activate
With ActiveSheet.Cells
Set c = .Find(strText, LookIn:=xlValues)
If Not c Is Nothing Then
iFoundRow = c.Row
strSheet = sht.Name
FindInSheets = True
Exit Function
End If
End With
Next sht

End Functio

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Importing data from another workbook

Excuse the typo...

flase should of course be FALS

--
Message posted from http://www.ExcelForum.com

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
Importing data from another workbook? Bruce Hancock[_2_] Excel Worksheet Functions 0 May 6th 07 10:30 PM
importing data into a workbook PizzaBoy Excel Worksheet Functions 2 August 23rd 05 02:38 PM
Importing data from a different workbook Mike Excel Worksheet Functions 1 May 5th 05 09:11 PM
Importing data into an existing workbook Bob Reynolds Excel Worksheet Functions 2 April 15th 05 03:43 PM
Importing Data from unopened Workbook into an open Workbook GrayesGhost Excel Discussion (Misc queries) 0 March 5th 05 11:25 PM


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