View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aaron Aaron is offline
external usenet poster
 
Posts: 287
Default Referencing a cell where lookup value is not on same row

All is good until the last step with the formula :
=INDEX($C$2:$C$200,MATCH(E2,$D$2:$D$200,0)+COUNTIF ($D$2:$D$200,E2),0)

What value am I trying to get exactly?

"muddan madhu" wrote:

Try this

Col A Id number
Col B Name
Col C Hours

Col D - cell D2 put this formula ( helping column )
=IF(A2<A3,A2,D1) and drag it down

Now Copy the Col A and Paste it in Col E

delete the blank cells - ( select the Range in Col E - Click F5 |
click special | choose blanks | ok | right click on col E | delete |
shift cells up | ok | esc

Now using Vlookup u can get the names in Col F =VLOOKUP(E2,$A$2:$B
$200,2,0)

Now in cell G2 put this forumla =INDEX($C$2:$C$200,MATCH(E2,$D$2:$D
$200,0)+COUNTIF($D$2:$D$200,E2),0)




On Nov 20, 9:14 pm, Aaron wrote:
Hi,

I need some help... Here is my data:
_____________________________________________
A B C D
1 ID Number Name Hours
2 10153 Joe 8
3 8
4 8
5 Total 24
6
7 10219 Bob 5
8 5
9 Total 10
10
11 10569 Tim 10
12 8
13 8
14 5
15 Total 31
___________________________________________

Basically, I want to copy the ID number, Name, and Total onto a separate
worksheet minimizing the need for manual data entry e.g.
10153 Joe 24
10569 Tim 31
etc.

Basically, I can copy the ID number onto the new worksheet and use a vlookup
to get the name. But I'm having difficultly referencing the Total since it's
not on the name row as the ID and Name. Any suggestions? Thanks!