View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Deb
 
Posts: n/a
Default Find and input value based on month

Django - I believe you want to use the VLOOKUP function. For example, let's
say you have a worksheet B with the months of the year in column A and a %
discount in column B associated with each month. In another worksheet A, you
want to enter a month and get the correct monthly discount for worksheet B.

In worksheet A, you would have a column for the month you want to lookup a
discount from the table array in worksheet B. In column B in worksheet A,
use cell A11 for the month you choose and use the following formula in cell
B11 (for example):
=VLOOKUP(A11,'Month & Pricing'!$A$2:$B$13,2,FALSE)
where A11 = the month you want to know the discount for from worksheet B

'Month & Pricing'!$A$2:$B$!13 is the table array in worksheet B called Month
& Pricing that will hold the months and associated discounts for each month
in cells A2:B13.

2 is the second column in the table array in worksheet B where the discount
will be found for the given month

FALSE is necessary if the table array is not in sorted order. For my
example, I don't have the table array sorted. It is just a list of each
month Jan-Dec with associated discount %s for each month.

If you take a look at the VLOOKUP command, it should help understand the
variables of the command.

Hope this helps!

--
Deb H.


"Django" wrote:

Appreciate it if anyone can help me with the following:

I am trying to use get excel to programatically retrieve data from a
separate work sheet based on what month it is. i.e. if I enter a month in one
cell I want excel to go to a cell in another spreadsheet, get the value and
put that value in another cell. This will be based on the 12 months of the
year. Appreciate any assistance provided.
--
Django