Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Populating other cells with combo box selection

On Sheet 1 I have the following data:

A B C D
1 Part CaseQty CasePrice UnitPrice
2 Nut 100 $5.00 =C2/B2
3 Bolt 200 $6.00 =C3/B3
4 Screw 300 $7.00 =C4/B4
5 Washer 400 $8.00 =C5/B5

On Sheet 2 I have a combo box to select from column A of Sheet 1 and
stores the selection in cell A1 of Sheet 2. I would also like cells B1,
C1, and D1 of Sheet 2 to be populated by the rest of the selected row's
information. So if I choose Washer in the combo box, then Sheet 2 will
have:
A B C D
1 Washer 400 $8.00 $0.02

I can get Washer into A1, but it's the other three cells that have me
stumped. Once I've made my selection, how to I tell either Excel or VB
which row on Sheet 1 has been chosen? Once I get that, I think I can
handle the rest. I'm using Excel 97 and have done similar things in
Access, but don't have much Excel experience.

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Populating other cells with combo box selection

B1: = VLOOKUP(A1,Sheet1!$A$1:$D$20,2,False)
C1: = VLOOKUP(A1,Sheet1!$A$1:$D$20,3,False)
D1: = VLOOKUP(A1,Sheet1!$A$1:$D$20,4,False)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Shevlin Ryan" wrote in message
...
On Sheet 1 I have the following data:

A B C D
1 Part CaseQty CasePrice UnitPrice
2 Nut 100 $5.00 =C2/B2
3 Bolt 200 $6.00 =C3/B3
4 Screw 300 $7.00 =C4/B4
5 Washer 400 $8.00 =C5/B5

On Sheet 2 I have a combo box to select from column A of Sheet 1 and
stores the selection in cell A1 of Sheet 2. I would also like cells B1,
C1, and D1 of Sheet 2 to be populated by the rest of the selected row's
information. So if I choose Washer in the combo box, then Sheet 2 will
have:
A B C D
1 Washer 400 $8.00 $0.02

I can get Washer into A1, but it's the other three cells that have me
stumped. Once I've made my selection, how to I tell either Excel or VB
which row on Sheet 1 has been chosen? Once I get that, I think I can
handle the rest. I'm using Excel 97 and have done similar things in
Access, but don't have much Excel experience.

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Populating other cells with combo box selection

That did it, Bob. Thanks again.

Bob Phillips wrote:

B1: = VLOOKUP(A1,Sheet1!$A$1:$D$20,2,False)
C1: = VLOOKUP(A1,Sheet1!$A$1:$D$20,3,False)
D1: = VLOOKUP(A1,Sheet1!$A$1:$D$20,4,False)


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
Populating a cell from a picklist selection Phil Servedio Excel Programming 1 May 17th 04 08:47 PM
Populating combo boxes Cecilkumara Fernando Excel Programming 3 November 7th 03 02:38 AM
Populating combo box with a function Derek Gadd Excel Programming 5 October 29th 03 10:59 AM
Populating Combo Boxes Tom Ogilvy Excel Programming 0 September 25th 03 04:29 AM
Filling multiple cells based on 1 combo box selection Serrena Carter Excel Programming 1 August 30th 03 02:14 PM


All times are GMT +1. The time now is 11:12 PM.

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"