#1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 6
Default if function

I have a formula that is not working.
=if($Z$58="",ag46+ag48+ag50)-if($z$58="X",0) If cell z58 is empty I want it
to add the ag cells and if z58 cell has an x in it I want it to show 0. It
is doing 0 for both functions, it is not adding the ag cells. What am I
doing wrong?
--
Louise
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,358
Default if function

Just curious, what do you want if $Z$58 is not blank and not an x?
=IF($Z$58="",SUM(AG46,AG48,AG50),IF($Z$58="x",0,"Z 58 is neither equal to x
or blank")
--
** John C **


"Louise" wrote:

I have a formula that is not working.
=if($Z$58="",ag46+ag48+ag50)-if($z$58="X",0) If cell z58 is empty I want it
to add the ag cells and if z58 cell has an x in it I want it to show 0. It
is doing 0 for both functions, it is not adding the ag cells. What am I
doing wrong?
--
Louise

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10
Default if function


You put:
=if($Z$58="",ag46+ag48+ag50)-if($z$58="X",0)

I believe it should be:
=if($Z$58="",ag46+ag48+ag50,if($z$58="X",0))

if I'm reading your explanation right.

BTW, consider using CHAR(215) instead of "X". It's the 'times' sign
and I think it looks a bit better (IMHO). e.g. "×"
  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 6
Default if function

That is the only 2 things I want in z58 blank or x
--
Louise


"John C" wrote:

Just curious, what do you want if $Z$58 is not blank and not an x?
=IF($Z$58="",SUM(AG46,AG48,AG50),IF($Z$58="x",0,"Z 58 is neither equal to x
or blank")
--
** John C **


"Louise" wrote:

I have a formula that is not working.
=if($Z$58="",ag46+ag48+ag50)-if($z$58="X",0) If cell z58 is empty I want it
to add the ag cells and if z58 cell has an x in it I want it to show 0. It
is doing 0 for both functions, it is not adding the ag cells. What am I
doing wrong?
--
Louise

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,358
Default if function

In that case, you could use data validation, go to menu Data--Validation,
choose Custom for the Allow field
And either type or copy the following formula into the formula field:
=AND(LEN(Z58)=1,OR(CODE(Z58)=88,CODE(Z58)=120))
You can put in information if you want on the Input Message tab, or even
customize your error if they try to make an invalid entry into the cell on
the Error Alert tab.
Then your formula would be:
=($Z$58="x")*(SUM(AG46,AG48,AG50)

--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Louise" wrote:

That is the only 2 things I want in z58 blank or x
--
Louise


"John C" wrote:

Just curious, what do you want if $Z$58 is not blank and not an x?
=IF($Z$58="",SUM(AG46,AG48,AG50),IF($Z$58="x",0,"Z 58 is neither equal to x
or blank")
--
** John C **


"Louise" wrote:

I have a formula that is not working.
=if($Z$58="",ag46+ag48+ag50)-if($z$58="X",0) If cell z58 is empty I want it
to add the ag cells and if z58 cell has an x in it I want it to show 0. It
is doing 0 for both functions, it is not adding the ag cells. What am I
doing wrong?
--
Louise

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
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
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
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 09:28 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"