View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
pmundle pmundle is offline
external usenet poster
 
Posts: 4
Default 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