Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Searching for a number in a list

Hi - I'm trying to do the following:

In Cell B1, I have the value "Smith, Joe"
In cell a4, I have a total number of hours for Joe Smith: 40. Depending on
the detail hours reported, the total hours may be in a different line. For
example, if Joe had 6 line items of detail, the total would be in line a6.

So, I have to first find Joe Smith in the spreadsheet, then find the total
line. Any ideas?

Paul Peterson
Velox Consulting.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Searching for a number in a list

Do you have a blank row after the total and then a new name? If so,
can you find the next name after Joe Smith (are they sorted?) and then
come back two rows?

MATCH will return the (relative) row in a range that a matched item is
found on, or you can look through the whole column and thus return the
absolute row.

Hope this helps.

Pete

On Jan 14, 5:04*pm, Paul Peterson - Velox Consulting, LLC
oft.com wrote:
Hi - I'm trying to do the following:





In Cell B1, I have the value "Smith, Joe"
In cell a4, I have a total number of hours for Joe Smith: 40. Depending on
the detail hours reported, the total hours may be in a different line. For
example, if Joe had 6 line items of detail, the total would be in line a6.


So, I have to first find Joe Smith in the spreadsheet, then find the total
line. Any ideas?


Paul Peterson
Velox Consulting.- Hide quoted text -


- Show quoted text -


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Searching for a number in a list

Is there some text or something that indicates its the total row? For
instance, if column A is the name, Column B is what he did or "Total", and
Column C is the hours, you could do
=SUMPRODUCT((A2:A100="Smith, Joe")*(B2:B100="Total")*(C2:C100))

If its just that the total row is the last row under that name (hours is in
column B)
=SUMPRODUCT((A2:A100="Smith, Joe")*(A2:A100<A3:A101)*(B2:B100))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Paul Peterson - Velox Consulting, LLC" wrote:

Hi - I'm trying to do the following:

In Cell B1, I have the value "Smith, Joe"
In cell a4, I have a total number of hours for Joe Smith: 40. Depending on
the detail hours reported, the total hours may be in a different line. For
example, if Joe had 6 line items of detail, the total would be in line a6.

So, I have to first find Joe Smith in the spreadsheet, then find the total
line. Any ideas?

Paul Peterson
Velox Consulting.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Searching for a number in a list

thanks for the quick reply - I'll try this too.

"Luke M" wrote:

Is there some text or something that indicates its the total row? For
instance, if column A is the name, Column B is what he did or "Total", and
Column C is the hours, you could do
=SUMPRODUCT((A2:A100="Smith, Joe")*(B2:B100="Total")*(C2:C100))

If its just that the total row is the last row under that name (hours is in
column B)
=SUMPRODUCT((A2:A100="Smith, Joe")*(A2:A100<A3:A101)*(B2:B100))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Paul Peterson - Velox Consulting, LLC" wrote:

Hi - I'm trying to do the following:

In Cell B1, I have the value "Smith, Joe"
In cell a4, I have a total number of hours for Joe Smith: 40. Depending on
the detail hours reported, the total hours may be in a different line. For
example, if Joe had 6 line items of detail, the total would be in line a6.

So, I have to first find Joe Smith in the spreadsheet, then find the total
line. Any ideas?

Paul Peterson
Velox Consulting.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Searching for a number in a list


thanks for the quick reply - I'll try this.
"Pete_UK" wrote:

Do you have a blank row after the total and then a new name? If so,
can you find the next name after Joe Smith (are they sorted?) and then
come back two rows?

MATCH will return the (relative) row in a range that a matched item is
found on, or you can look through the whole column and thus return the
absolute row.

Hope this helps.

Pete

On Jan 14, 5:04 pm, Paul Peterson - Velox Consulting, LLC
oft.com wrote:
Hi - I'm trying to do the following:





In Cell B1, I have the value "Smith, Joe"
In cell a4, I have a total number of hours for Joe Smith: 40. Depending on
the detail hours reported, the total hours may be in a different line. For
example, if Joe had 6 line items of detail, the total would be in line a6.


So, I have to first find Joe Smith in the spreadsheet, then find the total
line. Any ideas?


Paul Peterson
Velox Consulting.- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Searching for a number in a list


Pete, I just realized I don't know how to back up one row - can you help?
"Pete_UK" wrote:

Do you have a blank row after the total and then a new name? If so,
can you find the next name after Joe Smith (are they sorted?) and then
come back two rows?

MATCH will return the (relative) row in a range that a matched item is
found on, or you can look through the whole column and thus return the
absolute row.

Hope this helps.

Pete

On Jan 14, 5:04 pm, Paul Peterson - Velox Consulting, LLC
oft.com wrote:
Hi - I'm trying to do the following:





In Cell B1, I have the value "Smith, Joe"
In cell a4, I have a total number of hours for Joe Smith: 40. Depending on
the detail hours reported, the total hours may be in a different line. For
example, if Joe had 6 line items of detail, the total would be in line a6.


So, I have to first find Joe Smith in the spreadsheet, then find the total
line. Any ideas?


Paul Peterson
Velox Consulting.- Hide quoted text -


- Show quoted text -



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching A List smartin Excel Worksheet Functions 1 August 27th 08 08:41 PM
searching for a word(s) within a list Philippa Excel Discussion (Misc queries) 5 August 12th 08 07:30 PM
Searching for a contact without going through the whole list. vvsmith Excel Worksheet Functions 4 November 6th 07 07:09 PM
Searching, matching then searching another list based on the match A.S. Excel Discussion (Misc queries) 1 December 13th 06 05:08 AM
searching within list sedonovan Excel Discussion (Misc queries) 4 June 23rd 06 02:51 PM


All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"