Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a cell based on a criteria
Hi,
I am new to Excel forms and VBA.I have created a form to fill data to selected cells of a worksheet.I have two combo boxes from which the user can select predefined values and some text boxes.The data needs to be filled depending on these two combo box selections. To illustrate this let us take a worksheet which has names of items nos in cells A2:A10.Range B2:B13 contains the months Jan to Dec.The combo box selects item no and month.The data is from text box is filled to the respective cell depending on month and item no. I have done the job by using select case procedure but this becomes very long for a large worksheet and multiple criteria.Please help me with some alternative method like search/find etc. Thanks P.Mundle |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a cell based on a criteria
I am not clear what you want to do with the data, but it seems that you
might need to know which item has been found. If one combobox is pointing at A2:A10, the ListIndex will point at the index within that range less 1, so if A2 is selected, it will be 0, etc. -- HTH RP (remove nothere from the email address if mailing direct) "pmundle" wrote in message ups.com... Hi, I am new to Excel forms and VBA.I have created a form to fill data to selected cells of a worksheet.I have two combo boxes from which the user can select predefined values and some text boxes.The data needs to be filled depending on these two combo box selections. To illustrate this let us take a worksheet which has names of items nos in cells A2:A10.Range B2:B13 contains the months Jan to Dec.The combo box selects item no and month.The data is from text box is filled to the respective cell depending on month and item no. I have done the job by using select case procedure but this becomes very long for a large worksheet and multiple criteria.Please help me with some alternative method like search/find etc. Thanks P.Mundle |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a cell based on a criteria
I would like to fill data to the appropriate cell.
If A2:A10 contains item Nos 1 to 9,B1:B13 contains Jan to Dec, and I want to enter data (say quantity purchased) for the month of April,item No 7 ,my txtbox value should get copied to cell E8 only.E8 happens to be the intersection of the Row containing "7" and the coloumn containing "April". Bob Phillips wrote: I am not clear what you want to do with the data, but it seems that you might need to know which item has been found. If one combobox is pointing at A2:A10, the ListIndex will point at the index within that range less 1, so if A2 is selected, it will be 0, etc. -- HTH RP (remove nothere from the email address if mailing direct) "pmundle" wrote in message ups.com... Hi, I am new to Excel forms and VBA.I have created a form to fill data to selected cells of a worksheet.I have two combo boxes from which the user can select predefined values and some text boxes.The data needs to be filled depending on these two combo box selections. To illustrate this let us take a worksheet which has names of items nos in cells A2:A10.Range B2:B13 contains the months Jan to Dec.The combo box selects item no and month.The data is from text box is filled to the respective cell depending on month and item no. I have done the job by using select case procedure but this becomes very long for a large worksheet and multiple criteria.Please help me with some alternative method like search/find etc. Thanks P.Mundle |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a cell based on a criteria
A correction for the previous post.B1:B13 is wrong.I mean,Row 1.
Cells B1,C1,D1, ....M1.for Jan to Dec. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a cell based on a criteria
I thought that might be the case.
Are you PizzaFriend as well? =OFFSET(A1,MATCH(Item,A2:A20,0),MATCH(Month,B1:M1, 0)) -- HTH RP (remove nothere from the email address if mailing direct) "pmundle" wrote in message oups.com... A correction for the previous post.B1:B13 is wrong.I mean,Row 1. Cells B1,C1,D1, ....M1.for Jan to Dec. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a cell based on a criteria
Thanks .It works.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting rows based on criteria | Excel Discussion (Misc queries) | |||
Selecting rows based simultaneously on 3 criteria | Excel Programming | |||
VBA - Selecting Based on Criteria | Excel Programming | |||
Selecting Sheets based on Cell Criteria. | Excel Programming | |||
selecting and deleting a row based on a cell value | Excel Programming |