Thread: vlookup by date
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PointerMan PointerMan is offline
external usenet poster
 
Posts: 33
Default vlookup by date

I don't need the count of items. I'm trying to get the actual contents of
all of the cells in Sheet1 to be sorted into columns on Sheet2 by the first
three digits of the cell. In my data the first three digits are "12-". This
would get sorted into a December column on Sheet2.

"JBeaucaire" wrote:

Well, guessing a little here. Are you manually deciding on the 3-digits to
look for? From your dataset I chose 703. Since the cells with that data in it
also have dashes, I think excel believes that data to be text, so I put "703"
in the formula to treat it as text, too.

This is also a CSE formula (Ctrl-Shift-Enter), and result in 65 as the answer:

=SUMPRODUCT(--(MONTH($A$1:$A$4)=12),
--(LEFT($C$1:$C$4,3)="703"),$D$1:$D$4)

Is this closer?
--
"Actually, I *am* a rocket scientist." -- JB
Your feedback is appreciated, click YES if this post helped you.


"PointerMan" wrote:

This is the data for 4 cells. Each row below represents one cell. I'm
looking for the cell data based on the first 3 digits of the cell.

12-17-08 SHIP 70302-22101-112 37
12-18-08 PKG 70302-22101-111 28
12-30-08 SHIP 74A350834-2019 37
12-30-08 SHIP 901-069-113-134 3