我喜欢一个sheet1,它将在eveyday更新:
+---------+----------+-----------+
| company | date | total_log |
+---------+----------+-----------+
| A | 20180910 | 32987 |
| A | 20180902 | 426 |
| A | 20180905 | 42135 |
| B | 20180906 | 64743 |
| B | 20180910 | 235647 |
| B | 20180902 | 2346 |
| C | 20180804 | 67536 |
| C | 20180910 | 34536 |
| C | 20180510 | 235356 |
+---------+----------+-----------+
如何通过Excel自动基于Sheet1更新Sheet2上的日期和total_log列,并使用Excel自动为每个公司提供最大日期
+---------+------+-----------+
| company | date | total_log |
+---------+------+-----------+
| A | | |
| B | | |
| C | | |
+---------+------+-----------+
答案 0 :(得分:-1)
Sheet2 B2的公式
=MAX(INDIRECT(ADDRESS(IF($A1="company",1,MATCH($A1,Sheet1!$A$1:$A$11)), 2, 1,1, "Sheet1")&":"&ADDRESS(MATCH($A2,Sheet1!$A$1:$A$11), 2, 1, 1)))
Sheet2 B3的公式
=MAX(INDIRECT(ADDRESS(IF($A1="company",1,MATCH($A1,Sheet1!$A$1:$A$11)), 3, 1,1, "Sheet1")&":"&ADDRESS(MATCH($A2,Sheet1!$A$1:$A$11), 3, 1, 1)))