Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-16-2015, 07:53 AM
lynchbro lynchbro is offline Nesting and IF & AND statement Windows 8 Nesting and IF & AND statement Office 2010 64bit
Advanced Beginner
Nesting and IF & AND statement
 
Join Date: Jun 2014
Location: New York
Posts: 41
lynchbro is on a distinguished road
Default Nesting and IF & AND statement

I have the following formula which I have validated and it works:



=SUMIFS(Holdings!N:N,Holdings!A:A,'Trial Balance'!C3)-SUMIFS(Holdings!P:P,Holdings!A:A,'Trial Balance'!C3)

I now want to add some more to it, I think that an IF & AND statement is correct.

=IF(AND(G3="105",D3="Composite"),SUMIFS(Holdings!N:N,Holdings!A:A,'Trial Balance'!C3)-SUMIFS(Holdings!P:P,Holdings!A:A,'Trial Balance'!C3),0)

But this is returning a value of ZERO. If I switch it so that the SUMIFS is the value if false & use a ZERO for value if true the formula works.

Is there something wrong with my IF AND statement?

Once I get the formula to work for the true side instead of zero for the false it will become a nested formula to for other "Numbers" in G3.

Thanks Everyone!
Reply With Quote
  #2  
Old 04-16-2015, 09:35 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Nesting and IF & AND statement Windows 7 64bit Nesting and IF & AND statement Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Probably remove the double quotes around the value for G3 like G3=105
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 04-16-2015, 11:33 AM
lynchbro lynchbro is offline Nesting and IF & AND statement Windows 7 64bit Nesting and IF & AND statement Office 2010 32bit
Advanced Beginner
Nesting and IF & AND statement
 
Join Date: Jun 2014
Location: New York
Posts: 41
lynchbro is on a distinguished road
Default

awesome! So if I understand this, quotes are only needed around actual text, if it a hard reference of a number it is not?
Reply With Quote
  #4  
Old 04-16-2015, 11:39 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Nesting and IF & AND statement Windows 7 64bit Nesting and IF & AND statement Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Exactly. If it really is text double quotes are needed G3="text" needs the quotes otherwise, no joy.
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #5  
Old 04-16-2015, 11:39 AM
lynchbro lynchbro is offline Nesting and IF & AND statement Windows 7 64bit Nesting and IF & AND statement Office 2010 32bit
Advanced Beginner
Nesting and IF & AND statement
 
Join Date: Jun 2014
Location: New York
Posts: 41
lynchbro is on a distinguished road
Default

Great! Thank you!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nesting and IF & AND statement Need a little help with an if statement cangelis Excel 2 04-08-2015 05:55 PM
Script starts nesting tables without reason selman555 Word VBA 1 10-17-2014 01:01 AM
Add a statement sma Word 6 03-23-2014 10:30 AM
Nesting and IF & AND statement Nesting Variables SET, LISTNUM, and REF Wyskers Word 1 11-13-2011 05:43 AM
Nesting and IF & AND statement Help with IF Statement limpbizkit Excel 4 02-24-2011 09:16 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft