Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default clicking on a button copies the choice *(VBA)

Hello folks.
In a sheet, I have a drop down list of Patient IDs. Say cell A1. next to
it, on cell B1, I have a pull-down menue of their specific Disease.
There are about 200 such Patient IDs that I need to assign their disease to.

On a separate sheet, I have a list of about 10,000 patient IDs. What I like
to be able to do is to set up a button that lunches a VBA.
What I want this VBA program to do is look through the 10,000 or so list of
Patient IDs on the second sheet, and find the one that matches the same
Patietn ID that I have selected from my pull down menu on the first sheet and
then copy the disease that I choose from cell B1 in the cell next to that
patient's ID on the second sheet.

I hope I made sense. Basiclly, I need a complete VBA that I can copy and
paste in my code window, assign that click-event button to it and use it.

Essentially, what I want is as I choose a patient ID from cell A1, sheet 1
and assign to this patient is a disease from pull-down menu in B1, sheet 1,
that this disease be copied in front of it correct patient Id (among many
thousands of patient id) on sheet2.

I hope someone can help us out :)

thanks

Thrava
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 791
Default clicking on a button copies the choice *(VBA)

Thrava, how about, on sheet 2 in the column for diseases, say C, in C2 you
could put the following formula: =VLOOKUP(A2,Sheet1!$A$2:$B$200,2,False),
and copy this down for all your patient ID codes in Sheet 2. If you don't
want to see #NA because a cell in Column B, sheet 1 is blank you can add,
after the first paren,
IF(Sheet1!B2="","",VLOOKUP........HTH
--
Sincerely, Michael Colvin


"Thrava" wrote:

Hello folks.
In a sheet, I have a drop down list of Patient IDs. Say cell A1. next to
it, on cell B1, I have a pull-down menue of their specific Disease.
There are about 200 such Patient IDs that I need to assign their disease to.

On a separate sheet, I have a list of about 10,000 patient IDs. What I like
to be able to do is to set up a button that lunches a VBA.
What I want this VBA program to do is look through the 10,000 or so list of
Patient IDs on the second sheet, and find the one that matches the same
Patietn ID that I have selected from my pull down menu on the first sheet and
then copy the disease that I choose from cell B1 in the cell next to that
patient's ID on the second sheet.

I hope I made sense. Basiclly, I need a complete VBA that I can copy and
paste in my code window, assign that click-event button to it and use it.

Essentially, what I want is as I choose a patient ID from cell A1, sheet 1
and assign to this patient is a disease from pull-down menu in B1, sheet 1,
that this disease be copied in front of it correct patient Id (among many
thousands of patient id) on sheet2.

I hope someone can help us out :)

thanks

Thrava

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
Assign a macro to a command button SheriTingle Excel Discussion (Misc queries) 4 September 25th 06 06:38 PM
Use the Merge & Center Button with unprotected Cells - sheet prote Dennis Cantellops Setting up and Configuration of Excel 1 September 22nd 06 12:49 AM
Protecting a worksheet which has button controlled macros Clinton Walker Excel Discussion (Misc queries) 0 September 8th 06 03:21 AM
UserForm Print Extra Copies mully Excel Discussion (Misc queries) 2 September 9th 05 08:33 PM
How do I setup a spin button in excel Andy K Excel Discussion (Misc queries) 1 November 26th 04 09:08 PM


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