#1   Report Post  
Posted to microsoft.public.excel.misc
Re. Re. is offline
external usenet poster
 
Posts: 1
Default IF Function

I'm in the process of writing an excel sheet to do a series of calculations
and lookups etc. and have got to the final calculation and cant make the step
work!

I need to calculate the reciprocal of 6 numbers. i.e 1/a = 1/b+1/c+1/d etc.
fairly standard, but i dont always have a value and i want to make excel
ignore the step if there is no value in a particular cell (these are linked
from previous sheets and currently have =if(cellx = "yes", celly,"")).
However, when the "" is used for 1/b+1/c etc. i get a #value error.

Any ideas on ways around this would be greatly appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default IF Function

Hi,
I assume that if one of the values in a, b,c,d are "", to enter "" otherwise
to perform your calculation

=IF(OR(A2="",B2="",C2="",D2=""),"",1/A2+1/B2+1/C2+1/D2)

If this help please say yes, thanks

"Re." wrote:

I'm in the process of writing an excel sheet to do a series of calculations
and lookups etc. and have got to the final calculation and cant make the step
work!

I need to calculate the reciprocal of 6 numbers. i.e 1/a = 1/b+1/c+1/d etc.
fairly standard, but i dont always have a value and i want to make excel
ignore the step if there is no value in a particular cell (these are linked
from previous sheets and currently have =if(cellx = "yes", celly,"")).
However, when the "" is used for 1/b+1/c etc. i get a #value error.

Any ideas on ways around this would be greatly appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default IF Function

Use a CSE formula to test each of the cells before the function. this would
be easiest to design if I had an example of actual data and an actual result,
but hopefully this will get you in the right direction. Here are two sample
formulas.

In cell A9, this formula would examine B9, C9 and D9 and sum only the cells
with data
=1/SUM(IF(B9:D9<0,1/(B9:D9)))
or
=SUM(IF(B9:D9<0,1/(B9:D9)))

....but you MUST enter that formula by pressing CTRL-SHIFT-ENTER to activate
the array. you'll see braces { } around your formula if you do that and you
will get an answer instead of an error. You will still get an error when ALL
3 cells are empty.


--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Eduardo" wrote:

Hi,
I assume that if one of the values in a, b,c,d are "", to enter "" otherwise
to perform your calculation

=IF(OR(A2="",B2="",C2="",D2=""),"",1/A2+1/B2+1/C2+1/D2)

If this help please say yes, thanks

"Re." wrote:

I'm in the process of writing an excel sheet to do a series of calculations
and lookups etc. and have got to the final calculation and cant make the step
work!

I need to calculate the reciprocal of 6 numbers. i.e 1/a = 1/b+1/c+1/d etc.
fairly standard, but i dont always have a value and i want to make excel
ignore the step if there is no value in a particular cell (these are linked
from previous sheets and currently have =if(cellx = "yes", celly,"")).
However, when the "" is used for 1/b+1/c etc. i get a #value error.

Any ideas on ways around this would be greatly appreciated.

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
ISBLANK function not working when cell is blank dut to function re mcmilja Excel Discussion (Misc queries) 9 May 7th 23 03:43 AM
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


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