LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 72
Default If function Help

Hi Stan,

The following nested if formula worked for me, with the following
assumptions:

C:\Users\Peggy\Desktop = path for first file.
testit = filename of first file.
A:A = range to sum in first file.
A1 = fixed cell in second file.

If the fixed cell in your second file is not 1-6, then the results in the
cell with the formula will be blank.

=IF(A1=1,SUM('C:\Users\Peggy\Desktop\[testit.xls]Week
1'!A:A),IF(A1=2,SUM('C:\Users\Peggy\Desktop\[testit.xls]Week
2'!A:A),IF(A1=3,SUM('C:\Users\Peggy\Desktop\[testit.xls]Week
3'!A:A),IF(A1=4,SUM('C:\Users\Peggy\Desktop\[testit.xls]Week
1'!A:A),IF(A1=5,SUM('C:\Users\Peggy\Desktop\[testit.xls]Week
5'!A:A),IF(A1=6,SUM('C:\Users\Peggy\Desktop\[testit.xls]Week 6'!A:A),""))))))

If you need help with changing your path, file, or range names - let me know.

Let me know if this helps.

Thanks,
Peggy

"Stan Halls" wrote:

i have 2 files, one file has 6 tabs named week1 - 6 filled with data,
the 2nd file has a fixed cell that has a number from 1 - 6 ,
in a cell on file 2 i want to check the fixed cell and depending on the
number get the results from the corrosonding tab on the other file
so if the result in the fixed cell is 1 then sum filename sheet1:a1 if 2
then filename sheet2:a1 and so on ,
any ideas
Thanks in advance for any help

 
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
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Embed a countif function in subtotal function? Stuck at work Excel Worksheet Functions 1 February 14th 06 03:19 AM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 06:07 AM.

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"