#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Merge
 
Posts: n/a
Default if statements

I have 7 sheets in a workbook, I would like to
if all seven sheets cell a2 = a blank cell return the total amt in cell
c2(in each sheer c2 is a sum of 3 other columns. iF not enter a zero amt.

example -if('sheet1:sheet7'!a2=" ",'sheet1:sheet7!c2,"0")
I do this and I get a ref error. How else can I type this?

Thanks
  #2   Report Post  
Junior Member
 
Posts: 7
Default

=if(and(sheet1!a2="",sheet2!a2="",sheet2!a3="",she et2!a4="",sheet2!a5="",sheet6!a2="",sheet2!a7=""), "If its true","if its false")


Quote:
Originally Posted by Merge
I have 7 sheets in a workbook, I would like to
if all seven sheets cell a2 = a blank cell return the total amt in cell
c2(in each sheer c2 is a sum of 3 other columns. iF not enter a zero amt.

example -if('sheet1:sheet7'!a2=" ",'sheet1:sheet7!c2,"0")
I do this and I get a ref error. How else can I type this?

Thanks
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Merge
 
Posts: n/a
Default if statements

because I want it to update atuomatically. if A2 references work completed
then I wouldn't want to include that . So I am am saying if A2= balnk cell
them bring over the data from C2(which happens to be a result of a formula)


"Don Guillett" wrote:

Why not just sim em
=sum(sheet1:sheet7!c2)


--
Don Guillett
SalesAid Software

"Merge" wrote in message
...
I have 7 sheets in a workbook, I would like to
if all seven sheets cell a2 = a blank cell return the total amt in cell
c2(in each sheer c2 is a sum of 3 other columns. iF not enter a zero amt.

example -if('sheet1:sheet7'!a2=" ",'sheet1:sheet7!c2,"0")
I do this and I get a ref error. How else can I type this?

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default if statements

Sorry, I'm a bit confused between your two postings. In your first post
you seem to be saying that if every A2 cell on the seven sheets is
blank, then you want the sum of all the C2 cells, otherwise you want
zero (so if you have only 6 or fewer blanks then you want a zero).

Now you seem to be saying that if A2 is blank on any sheet, then add C2
from that sheet (so if you have 5 blanks, then you will have five C2
cells added together).

Which is it to be?

Pete



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Merge
 
Posts: n/a
Default if statements

yes you 've got it my explanation was not clear the first time.
Thank you

"Pete_UK" wrote:

Sorry, I'm a bit confused between your two postings. In your first post
you seem to be saying that if every A2 cell on the seven sheets is
blank, then you want the sum of all the C2 cells, otherwise you want
zero (so if you have only 6 or fewer blanks then you want a zero).

Now you seem to be saying that if A2 is blank on any sheet, then add C2
from that sheet (so if you have 5 blanks, then you will have five C2
cells added together).

Which is it to be?

Pete


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Merge
 
Posts: n/a
Default if statements

I was not clear the first time.
it is....
if A2 is blank on any sheet, then add C2 from that sheet (so if you have 5
blanks, then you will have five C2 cells added together).

Thanks


"Pete_UK" wrote:

Sorry, I'm a bit confused between your two postings. In your first post
you seem to be saying that if every A2 cell on the seven sheets is
blank, then you want the sum of all the C2 cells, otherwise you want
zero (so if you have only 6 or fewer blanks then you want a zero).

Now you seem to be saying that if A2 is blank on any sheet, then add C2
from that sheet (so if you have 5 blanks, then you will have five C2
cells added together).

Which is it to be?

Pete


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default if statements

Let E2:E8 contain the sheet names, then try the following formula...

=SUMPRODUCT(--(COUNTIF(INDIRECT("'"&E2:E8&"'!A2"),"?*")=0),N(IND IRECT("'"
&E2:E8&"'!C2")))

Hope this helps!

In article ,
Merge wrote:

if A2 is blank on any sheet, then add C2 from that sheet (so if you have 5
blanks, then you will have five C2 cells added together).

Thanks

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
UDFunctions and nested If-the-else statements JDB Excel Worksheet Functions 1 January 25th 06 03:29 PM
Linking two IF statements together trixma Excel Discussion (Misc queries) 2 September 29th 05 06:07 AM
Better Way to Code IF Statements? TheRobsterUK Excel Discussion (Misc queries) 4 July 18th 05 03:37 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
If statements Mark Excel Worksheet Functions 3 November 2nd 04 08:39 PM


All times are GMT +1. The time now is 02:27 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"