Excel formula

2007-06-12 1:56 am
if i have a database with columns (say time) and rows (days)
Time Mon Tue Wed Thu Fri Sat Sun
12:00 $60 $60 $60 $60 $60 $40 $40
14:00 $90 $90 $90 $90 $90 $65 $65
18:00 $70 $70 $70 $70 $70 $55 $55

how to create a formula to find the price in following criteria??
Wed 14:00
Sun 18:00

ie need to match both the column and row to get the data.
thx

回答 (3)

2007-06-12 7:02 pm
✔ 最佳答案
to do search and match, start up a new searching & matching table :
*Col.(X) = column (X) *Row.(X) = row (x)

For example, your table area is A2:H4, put in $A$2:$H$4 to prevent shifting when you copy the formula into the next cell.
For example, area for days is B1:H1, put in $B$1:$H$1.


Row.K Row.L Row.M
Col.3 Date Time Results(Price)
Col.4 Wed 14:00 =vlookup(K4,$A$2:$H$4,MATCH(L4,$B$1:$H$1,0))
Col.5 Sun 18:00 =vlookup(K5,$A$2:$H$4,MATCH(L5,$B$1:$H$1,0))


Then you should M4 should results in 90 and M5 should results in 55. Remember to change the cell format into price.

If you want to copy formula into blank cell but with blank data in Row K & L, put in
=if(K6= "_" , "_" ,vlookup(K6,$A$2:$H$4,MATCH(L6,$B$1:$H$1,0))).
*please ignore the _ inside the quotation mark when you come to the formula in excel file, becoz this web cannot display quotation mark without quotes in it.
When you input data in K6 and L6, it should results in what you want.

Should you have any problem, you can e-mail me and i can send you the sample.
2015-10-07 3:06 am
是否有 formula 分辨同一 cell 內入相同數字
2007-06-14 6:10 am
=SUMPRODUCT(($B$3:$H$3=A8)*($A$4:$A$6=B8)*($B$4:$H$6))

(B3:B8) -- Mon Tue Wed Thu Fri Sat Sun
(A4:A6) -- 12:00 14:00 18:00
(B4:H6) --
$60 $60 $60 $60 $60 $40 $40
$90 $90 $90 $90 $90 $65 $65
$70 $70 $70 $70 $70 $55 $55
A8=Wed
B8=14:00


收錄日期: 2021-04-24 10:50:03
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070611000051KK03113

檢視 Wayback Machine 備份