#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default IF Function

Hi:

I need help with the following function:

if sum(P138*AC138/100)0
then I want that sum (P138*AC138)
otherwise sum(AO138:AT138)

I don't know if this makes a difference; however, the calc in AC138 is
=(1-((AI138+AK138)/AV138))*AV138/P138*1000
which returns #DIV/0! because P is entered as zero which is correct
because that field is not relevant to that account.

If this is not clear I can try to provide more detail.

Thanks
cheetah

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF Function

You can change this formula:

=(1-((AI138+AK138)/AV138))*AV138/P138*1000

to this:

=IF(P138=0,0,(1-(AI138+AK138)/AV138)*AV138/P138*1000)

to avoid the #DIV/0 error. Then the other formula you want becomes:

=IF(P138*AC138/1000,P138*AC138,SUM(AO138:AT138))

Hope this helps.

Pete

cheetah wrote:
Hi:

I need help with the following function:

if sum(P138*AC138/100)0
then I want that sum (P138*AC138)
otherwise sum(AO138:AT138)

I don't know if this makes a difference; however, the calc in AC138 is
=(1-((AI138+AK138)/AV138))*AV138/P138*1000
which returns #DIV/0! because P is entered as zero which is correct
because that field is not relevant to that account.

If this is not clear I can try to provide more detail.

Thanks
cheetah


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default IF Function

=if((p138*ac138)/1000,p138*ac138,sum(ao138:at138))

Dave
--
Brevity is the soul of wit.


"cheetah" wrote:

Hi:

I need help with the following function:

if sum(P138*AC138/100)0
then I want that sum (P138*AC138)
otherwise sum(AO138:AT138)

I don't know if this makes a difference; however, the calc in AC138 is
=(1-((AI138+AK138)/AV138))*AV138/P138*1000
which returns #DIV/0! because P is entered as zero which is correct
because that field is not relevant to that account.

If this is not clear I can try to provide more detail.

Thanks
cheetah


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default IF Function


Pete_UK wrote:
You can change this formula:

=(1-((AI138+AK138)/AV138))*AV138/P138*1000

to this:

=IF(P138=0,0,(1-(AI138+AK138)/AV138)*AV138/P138*1000)

to avoid the #DIV/0 error. Then the other formula you want becomes:

=IF(P138*AC138/1000,P138*AC138,SUM(AO138:AT138))

Hope this helps.

Pete

Worked perfectly!

Thank you to all who replied.
cheetah

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
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
Creating a Custom Excel Function to Calculate Gini Coefficients [email protected] Excel Worksheet Functions 3 February 21st 06 10:15 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 06:52 PM.

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"