View Single Post
  #3   Report Post  
Max
 
Posts: n/a
Default

One way ..

Assumed set-ups in the 3 sheets, PriceList, Muster and Bill

In sheet: PriceList,
the table below is in A1:H3

Days Sun Mon Tue Wed Thu Fri Sat
Times 5 4 4 4 4 4 3.5
Economic 9 2 2 2 2 2 9

In sheet: Muster,
in cols B to AG, from row1 down,
you have:

Days Sun Mon Tue Wed etc
Date 1 2 3 4 .. 31
John P A A P .. etc
Lucy A P P A ... etc
etc

In sheet: Bill
in cols A to AG, from row1 down is:

<DV Days Sat Sun Mon Tue etc
------- Date 1 2 3 4 etc (till "31" in AG2)
1 John
2 Lucy

(Customer names: John, Lucy start in B3 down)

In A1, make a data validation list (DV)
to select the paper: Times, Economic

Select A1
Click Data Validation
Under Allow, select List
Put in 'Source" box: Times, Economic
Click OK

Put in C3:

=IF(INDEX(Muster!$A:$AG,MATCH($B3,Muster!$B:$B,0), MATCH(C$2,Muster!$2:$2,0))
="P",OFFSET(PriceList!$A$1,MATCH($A$1,PriceList!$A :$A,0)-1,MATCH(C$1,PriceLi
st!$1:$1,0)-1),0)

Copy C3 across to AG3,
fill down by as many rows as there are names in col B

For the sample data in Muster,
with "Times" selected in A1,
you'll get:

Times Days Sat Sun Mon Tue
------- Date 1 2 3 4
1 John 3.5 0 0 4
2 Lucy 0 5 4 0

And if "Economic" is selected in A1, you'll get:

Economic Days Sat Sun Mon Tue
------- Date 1 2 3 4
1 John 9 0 0 2
2 Lucy 0 9 2 0

(assuming the sample "P" indications for John and Lucy in Muster
also apply for the paper: Economic)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Ajit Munj" wrote in message
...
I have workbook named News.xls with 3 sheets namely Pricelist, Muster and
Bill for the month of January, 2005.
Muster contains presenty of each client, marked P for present & A for

Absent
A.....B.....C.....D.....
Days Sun Mon Tue Wed
Date 1 2 3 4
1 John P A A P
2 Lucy A P P A
3

Pricelist contains prices for news papers (amount in Indian Rupees)
A.....B.....C.....D.......E.........F.......G..... ..H...
Days Sun Mon Tue Wed Thu Fri Sat

Times 5 4 4 4 4 4 3.50

Economic 9 2 2 2 2 2 9

Now I want to prepare bills in sheet "Bill". I want Excel to check first
from Muster whether client is marked as "P" on 1st of Jan, 05 (Saturday),

if
so, he should take a price of Times newspaper for Saturday from sheet
Pricelist i.e. Rs.5/-, if not, put 0.00, & so on.. Thus my sheet will show

:



A.....B.....C.....D.....E.......F......G.......H.. ....I..Total
Days Sat Sun Mon Tue Wed Thu Fri Sat
Date 1 2 3 4

1 John 4 5 4 4 4 0 0 4

25.oo



Note : On Thu & Fri John was marked as "A"
How can I perform this in sheet Bill.


--
Knowldege is Power