Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Find and return a value

I have a spreadsheet consisting of 6 worksheets named for each manager. On
the 7th worksheet, I have to return the rightmost value of a row which is
greater than 0 (cells generally have 3 or 4 digit numbers, followed by any
number of cells with "0" in them). The problem is that the data is never
consistently in the same row and rows are never consistently the same length,
but the data I need from every worksheet is in a row where the heading is
"No. of People".

ie. worksheet "John"

No. of people 123 234 345 456 256 0 0 0 0


How do I return the value of 256 to a cell on the 7th worksheet?
Thanks,
Mrs. Robinson

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Find and return a value

You didn't say, but to make it "easier" to use, formula assumes sheet
name/person name is in cell A2. Can then copy down formula as desired.

Rather lengthy, but here's a tested formula:

=SUMPRODUCT((MAX((INDIRECT("'"&A2&"'!B"&MATCH("No. of
People",INDIRECT("'"&A2&"'!A:A"),0)&":IV"&MATCH("N o. of
People",INDIRECT("'"&A2&"'!A:A"),0))<0)*(COLUMN(I NDIRECT("'"&A2&"'!B"&MATCH("No.
of People",INDIRECT("'"&A2&"'!A:A"),0)&":IV"&MATCH("N o. of
People",INDIRECT("'"&A2&"'!A:A"),0)))))=COLUMN(IND IRECT("'"&A2&"'!B"&MATCH("No.
of People",INDIRECT("'"&A2&"'!A:A"),0)&":IV"&MATCH("N o. of
People",INDIRECT("'"&A2&"'!A:A"),0))))*(INDIRECT(" '"&A2&"'!B"&MATCH("No. of
People",INDIRECT("'"&A2&"'!A:A"),0)&":IV"&MATCH("N o. of
People",INDIRECT("'"&A2&"'!A:A"),0))))
--
Best Regards,

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


"Mrs. Robinson" wrote:

I have a spreadsheet consisting of 6 worksheets named for each manager. On
the 7th worksheet, I have to return the rightmost value of a row which is
greater than 0 (cells generally have 3 or 4 digit numbers, followed by any
number of cells with "0" in them). The problem is that the data is never
consistently in the same row and rows are never consistently the same length,
but the data I need from every worksheet is in a row where the heading is
"No. of People".

ie. worksheet "John"

No. of people 123 234 345 456 256 0 0 0 0


How do I return the value of 256 to a cell on the 7th worksheet?
Thanks,
Mrs. Robinson

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Find and return a value

I didn't go far enough to explain how the data is presented on my spreadsheet

John 256
Joe 351
Terry 123

etc.

I get a reference error in the formula below, even though I put the
manager's names in A2.

Appreciate your help -

"Luke M" wrote:

You didn't say, but to make it "easier" to use, formula assumes sheet
name/person name is in cell A2. Can then copy down formula as desired.

Rather lengthy, but here's a tested formula:

=SUMPRODUCT((MAX((INDIRECT("'"&A2&"'!B"&MATCH("No. of
People",INDIRECT("'"&A2&"'!A:A"),0)&":IV"&MATCH("N o. of
People",INDIRECT("'"&A2&"'!A:A"),0))<0)*(COLUMN(I NDIRECT("'"&A2&"'!B"&MATCH("No.
of People",INDIRECT("'"&A2&"'!A:A"),0)&":IV"&MATCH("N o. of
People",INDIRECT("'"&A2&"'!A:A"),0)))))=COLUMN(IND IRECT("'"&A2&"'!B"&MATCH("No.
of People",INDIRECT("'"&A2&"'!A:A"),0)&":IV"&MATCH("N o. of
People",INDIRECT("'"&A2&"'!A:A"),0))))*(INDIRECT(" '"&A2&"'!B"&MATCH("No. of
People",INDIRECT("'"&A2&"'!A:A"),0)&":IV"&MATCH("N o. of
People",INDIRECT("'"&A2&"'!A:A"),0))))
--
Best Regards,

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


"Mrs. Robinson" wrote:

I have a spreadsheet consisting of 6 worksheets named for each manager. On
the 7th worksheet, I have to return the rightmost value of a row which is
greater than 0 (cells generally have 3 or 4 digit numbers, followed by any
number of cells with "0" in them). The problem is that the data is never
consistently in the same row and rows are never consistently the same length,
but the data I need from every worksheet is in a row where the heading is
"No. of People".

ie. worksheet "John"

No. of people 123 234 345 456 256 0 0 0 0


How do I return the value of 256 to a cell on the 7th worksheet?
Thanks,
Mrs. Robinson

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
Find and Return kreffell Excel Discussion (Misc queries) 1 October 12th 07 02:36 PM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Find a value, return the value of another cell Dave F Excel Discussion (Misc queries) 6 December 14th 06 06:38 PM
find & return value Melissa Excel Discussion (Misc queries) 3 September 23rd 05 12:01 PM
find formula and return value Micayla Bergen Excel Discussion (Misc queries) 5 May 2nd 05 02:52 PM


All times are GMT +1. The time now is 10:13 PM.

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

About Us

"It's about Microsoft Excel"