Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Nested If problem

Friends,

I want to evaulate 9 cells of different workbooks to check if they are empty
and take value of the cell which is non empty(assuming only one cell contains
value) into my master sheet.

I will than plan to drag expand this cell to map all the cells accross the 9
workbooks.
I can use this using nested if, however excel 2003 will allow for only 7
levels.

Here is what I plan to do:

=if(isempty('C:\[wrksheet1.xls]sheet1'!A1)=false,''C:\[wrksheet1.xls]sheet1'!A1,if(isempty('C:\[wrksheet2.xls]sheet1'!A1=false,'C:\[wrksheet2.xls]sheet1'!A1,
............if(isempty('C:\[wrksheet9.xls]sheet1'!A1=false,'C:\[wrksheet9.xls]sheet1'!A1)))))))))

Is there any other way to do this.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Nested If problem

If you can guarantee that all but one cell is empty, then you can just
concatenate them all together - no need for IFs, i.e.:

='C:\[wrksheet1.xls]sheet1*'!A1 & 'C:\[wrksheet2.xls]shee*t1'!A1
& ...
..........'C:\[wrksheet9.x*ls]sheet1'!A1

If you really want to use IFs, then you can concatenate those together
to avoid nesting limits:

=if('C:\[wrksheet1.xls]sheet1'!A1)="","",'C:\[wrksheet1.xls]sheet1*'!
A1) &
if('C:\[wrksheet2.xls]sheet1'!A1="","",'C:\[wrksheet2.xls]shee*t1'!A1)
& ...
.............if('C:\[wrksheet9.xls]sheet1'!A1="","",'C:\[wrksheet9.x*ls]
sheet1'!A1)

Hope this helps.

Pete

On Aug 20, 8:17*pm, Harish Sharma
wrote:
Friends,

I want to evaulate 9 cells of different workbooks to check if they are empty
and take value of the cell which is non empty(assuming only one cell contains
value) into my master sheet.

I will than plan to drag expand this cell to map all the cells accross the 9
workbooks.
I can use this using nested if, however excel 2003 will allow for only 7
levels.

Here is what I plan to do:

=if(isempty('C:\[wrksheet1.xls]sheet1'!A1)=false,''C:\[wrksheet1.xls]sheet1*'!A1,if(isempty('C:\[wrksheet2.xls]sheet1'!A1=false,'C:\[wrksheet2.xls]shee*t1'!A1,
............if(isempty('C:\[wrksheet9.xls]sheet1'!A1=false,'C:\[wrksheet9.x*ls]sheet1'!A1)))))))))

Is there any other way to do this.

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Nested If problem

This was really a great logic and simple answer to my problem.
Thank you so much.


"Pete_UK" wrote:

If you can guarantee that all but one cell is empty, then you can just
concatenate them all together - no need for IFs, i.e.:

='C:\[wrksheet1.xls]sheet1Â*'!A1 & 'C:\[wrksheet2.xls]sheeÂ*t1'!A1
& ...
..........'C:\[wrksheet9.xÂ*ls]sheet1'!A1

If you really want to use IFs, then you can concatenate those together
to avoid nesting limits:

=if('C:\[wrksheet1.xls]sheet1'!A1)="","",'C:\[wrksheet1.xls]sheet1Â*'!
A1) &
if('C:\[wrksheet2.xls]sheet1'!A1="","",'C:\[wrksheet2.xls]sheeÂ*t1'!A1)
& ...
.............if('C:\[wrksheet9.xls]sheet1'!A1="","",'C:\[wrksheet9.xÂ*ls]
sheet1'!A1)

Hope this helps.

Pete

On Aug 20, 8:17 pm, Harish Sharma
wrote:
Friends,

I want to evaulate 9 cells of different workbooks to check if they are empty
and take value of the cell which is non empty(assuming only one cell contains
value) into my master sheet.

I will than plan to drag expand this cell to map all the cells accross the 9
workbooks.
I can use this using nested if, however excel 2003 will allow for only 7
levels.

Here is what I plan to do:

=if(isempty('C:\[wrksheet1.xls]sheet1'!A1)=false,''C:\[wrksheet1.xls]sheet1Â*'!A1,if(isempty('C:\[wrksheet2.xls]sheet1'!A1=false,'C:\[wrksheet2.xls]sheeÂ*t1'!A1,
............if(isempty('C:\[wrksheet9.xls]sheet1'!A1=false,'C:\[wrksheet9.xÂ*ls]sheet1'!A1)))))))))

Is there any other way to do this.

Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Nested If problem

You're welcome, Harish - thanks for feeding back.

Pete

On Aug 21, 1:20*pm, Harish Sharma
wrote:
This was really a great logic and simple answer to my problem.
Thank you so much.



"Pete_UK" wrote:
If you can guarantee that all but one cell is empty, then you can just
concatenate them all together - no need for IFs, i.e.:


='C:\[wrksheet1.xls]sheet1*'!A1 & 'C:\[wrksheet2.xls]shee*t1'!A1
& *...
..........'C:\[wrksheet9.x*ls]sheet1'!A1


If you really want to use IFs, then you can concatenate those together
to avoid nesting limits:


=if('C:\[wrksheet1.xls]sheet1'!A1)="","",'C:\[wrksheet1.xls]sheet1*'!
A1) &
if('C:\[wrksheet2.xls]sheet1'!A1="","",'C:\[wrksheet2.xls]shee*t1'!A1)
& ...
.............if('C:\[wrksheet9.xls]sheet1'!A1="","",'C:\[wrksheet9.x*ls]
sheet1'!A1)


Hope this helps.


Pete


On Aug 20, 8:17 pm, Harish Sharma
wrote:
Friends,


I want to evaulate 9 cells of different workbooks to check if they are empty
and take value of the cell which is non empty(assuming only one cell contains
value) into my master sheet.


I will than plan to drag expand this cell to map all the cells accross the 9
workbooks.
I can use this using nested if, however excel 2003 will allow for only 7
levels.


Here is what I plan to do:


=if(isempty('C:\[wrksheet1.xls]sheet1'!A1)=false,''C:\[wrksheet1.xls]sheet1**'!A1,if(isempty('C:\[wrksheet2.xls]sheet1'!A1=false,'C:\[wrksheet2.xls]she*e*t1'!A1,
............if(isempty('C:\[wrksheet9.xls]sheet1'!A1=false,'C:\[wrksheet9.x**ls]sheet1'!A1)))))))))


Is there any other way to do this.


Thanks!- 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
Nested If problem Harish Sharma[_2_] Excel Worksheet Functions 1 August 21st 09 04:41 PM
A problem with Nested IFs The Narcissist Excel Worksheet Functions 0 January 23rd 08 12:12 AM
Nested IF problem Andrew Mackenzie Excel Discussion (Misc queries) 3 June 28th 07 12:20 PM
Nested if problem samonly Excel Worksheet Functions 1 March 14th 06 01:33 PM
Nested IF problem - help please Dasin Excel Worksheet Functions 11 November 22nd 05 09:23 PM


All times are GMT +1. The time now is 01:45 AM.

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"