#1   Report Post  
Jonny
 
Posts: n/a
Default database help

I have 2 worksheets. One worksheet has a databse of: manufacturers - product
code - description - price.

The other worksheet is a cost sheet with multiple rows for the input of
product descriptions, model numbers and prices.

eg.
Item - Description - Qty - Product Code - Manufacturer - Price

Is there a way I could type model numbers in a cell and have the
description, manufacturer and price for that code automatically insert into a
cell on the same row?

Please note I know very little about macros or MS Access.

I would appreciate any help forthcoming.

Regards,

Jonny
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Jonny

this can be done via the use of VLOOKUP
assume that your "database of manufacturers" is on sheet 2 with
..........A.........................B............. ...........C.....................D
1.....Product Code......Description..........Price............Ma nufacturer

and your "other worksheet" is on sheet 1 with
...........A...................B.................C ..................D...................E........... .............F
1.....Item...........Description......Qty......... ......Product
Code...Manufacturer......Code

assuming you want to enter the details in column D and have B, E, F
automatically fill
in D2 use the following formula

=VLOOKUP(D2,Sheet2!$A$2:$D$1000,2,0)
this says, have a look at the value in D2, find it in column A of sheet2 and
return the related information from the 2nd column (meaning of the 2) of the
table where there is an exact match (meaning of the 0)

likewise for E2 the formula would be
=VLOOKUP(D2,Sheet2!$A$2:$D$1000,4,0)

note, however, if D2 is blank you'll get a #NA error - one way to deal with
this is to embed the VLOOKUP in an IF statement, such as

=IF(ISNA(ISBLANK(D1)),"",VLOOKUP(D1,Sheet2!$A$2:$D $1000,2,0))

have a look at Help on VLOOKUP for a more details

Cheers
JulieD

"Jonny" wrote in message
...
I have 2 worksheets. One worksheet has a databse of: manufacturers -
product
code - description - price.

The other worksheet is a cost sheet with multiple rows for the input of
product descriptions, model numbers and prices.

eg.
Item - Description - Qty - Product Code - Manufacturer - Price

Is there a way I could type model numbers in a cell and have the
description, manufacturer and price for that code automatically insert
into a
cell on the same row?

Please note I know very little about macros or MS Access.

I would appreciate any help forthcoming.

Regards,

Jonny



  #3   Report Post  
Jonny
 
Posts: n/a
Default

Thanks JulieD that sounds like it is what I need but whenever I try anything
you said it brings up formulae error.

The exact setup is like so:

Database (worksheet)
.....A...........B.............C.............D
Supplier - Code - Description - Price

note: codes can be a mixture of letters and numbers (dont know if this will
matter?)

Cost Sheet (worksheet)
...A............B............C.......D..........F. ...........G
Item - Description - Qty - Code - Supplier - Price

note: column E is not relevent (its only 2 pixels wide for some reason?) but
doesnt matter.

Thanks very much for the help
  #4   Report Post  
JulieD
 
Posts: n/a
Default

Hi Jonny

if you're entering or choosing CODE in column D of the Cost Sheet and want
to populate supplied / description and price you'll need to change (if
possible) the structure of the database so CODE is in column A - if it's not
possible to change we'll have to go for an INDEX/MATCH solution rather than
a VLOOKUP solution.

However assuming you can change it and you have done so then the formula in
column B of the Cost Sheet would be
=VLOOKUP(D2,Database!$A$2:$D$1000,3,0)
- to test, type this -you'll get #NA but don't worry, then copy & paste a
value from the Code column on the Database sheet into cell D2 on the Cost
Sheet ... the associated description should be filled in.

Let us know how you go

Cheers
JulieD



"Jonny" wrote in message
...
Thanks JulieD that sounds like it is what I need but whenever I try
anything
you said it brings up formulae error.

The exact setup is like so:

Database (worksheet)
....A...........B.............C.............D
Supplier - Code - Description - Price

note: codes can be a mixture of letters and numbers (dont know if this
will
matter?)

Cost Sheet (worksheet)
..A............B............C.......D..........F.. ..........G
Item - Description - Qty - Code - Supplier - Price

note: column E is not relevent (its only 2 pixels wide for some reason?)
but
doesnt matter.

Thanks very much for the help



  #5   Report Post  
Jonny
 
Posts: n/a
Default

Thank you very much Julie you have helped me very very much and I am forever
in your debt you are fantastic.

Jonny

PS. Thanks

"JulieD" wrote:

Hi Jonny

if you're entering or choosing CODE in column D of the Cost Sheet and want
to populate supplied / description and price you'll need to change (if
possible) the structure of the database so CODE is in column A - if it's not
possible to change we'll have to go for an INDEX/MATCH solution rather than
a VLOOKUP solution.

However assuming you can change it and you have done so then the formula in
column B of the Cost Sheet would be
=VLOOKUP(D2,Database!$A$2:$D$1000,3,0)
- to test, type this -you'll get #NA but don't worry, then copy & paste a
value from the Code column on the Database sheet into cell D2 on the Cost
Sheet ... the associated description should be filled in.

Let us know how you go

Cheers
JulieD



"Jonny" wrote in message
...
Thanks JulieD that sounds like it is what I need but whenever I try
anything
you said it brings up formulae error.

The exact setup is like so:

Database (worksheet)
....A...........B.............C.............D
Supplier - Code - Description - Price

note: codes can be a mixture of letters and numbers (dont know if this
will
matter?)

Cost Sheet (worksheet)
..A............B............C.......D..........F.. ..........G
Item - Description - Qty - Code - Supplier - Price

note: column E is not relevent (its only 2 pixels wide for some reason?)
but
doesnt matter.

Thanks very much for the help






  #6   Report Post  
JulieD
 
Posts: n/a
Default

you're welcome <vbg and thanks for the feedback

"Jonny" wrote in message
...
Thank you very much Julie you have helped me very very much and I am
forever
in your debt you are fantastic.

Jonny

PS. Thanks

"JulieD" wrote:

Hi Jonny

if you're entering or choosing CODE in column D of the Cost Sheet and
want
to populate supplied / description and price you'll need to change (if
possible) the structure of the database so CODE is in column A - if it's
not
possible to change we'll have to go for an INDEX/MATCH solution rather
than
a VLOOKUP solution.

However assuming you can change it and you have done so then the formula
in
column B of the Cost Sheet would be
=VLOOKUP(D2,Database!$A$2:$D$1000,3,0)
- to test, type this -you'll get #NA but don't worry, then copy & paste a
value from the Code column on the Database sheet into cell D2 on the Cost
Sheet ... the associated description should be filled in.

Let us know how you go

Cheers
JulieD



"Jonny" wrote in message
...
Thanks JulieD that sounds like it is what I need but whenever I try
anything
you said it brings up formulae error.

The exact setup is like so:

Database (worksheet)
....A...........B.............C.............D
Supplier - Code - Description - Price

note: codes can be a mixture of letters and numbers (dont know if this
will
matter?)

Cost Sheet (worksheet)
..A............B............C.......D..........F.. ..........G
Item - Description - Qty - Code - Supplier - Price

note: column E is not relevent (its only 2 pixels wide for some
reason?)
but
doesnt matter.

Thanks very much for the help






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 error while trying to import data from an Access database - MSQRY32.exe has generated errors X_HOBBES Excel Discussion (Misc queries) 0 March 15th 05 06:46 PM
Graphing Database Growth Rate DavidM Charts and Charting in Excel 1 February 2nd 05 12:01 AM
Open Access Database under and Excel window using a Macro BMSpell Excel Worksheet Functions 1 January 8th 05 05:32 PM
Need help with exel database john2004 Excel Discussion (Misc queries) 1 December 22nd 04 01:05 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 09:44 AM.

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

About Us

"It's about Microsoft Excel"