# Software

## General discussion

Locked

### Two formulas in a single cell

By ·
I have a data set, in which i need to do some calculations and report.
Here is my problem.
I have the headers like SP, CP and Conf CP. My calculation is like below:
I) Value = (SP-Conf CP)/SP*100
II) Value = (SP-CP)/SP*100
In most of the cases, my "Conf CP" will be 'o' and in such cases i should proceed with the second formula. But when there is value for "Conf CP" i should ignore the second formula and proceed with first formula.

Whether excel has the capability in doing this, if so, how we do it?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

Collapse -

### You need an IF statement

by In reply to Two formulas in a single ...

I believe the syntax for the Excel IF formula is something like

=IF (condition 1, result 1, else result 2)

Although you darn sure better use the Help feature to check the exact format. You'll wind up with something like:

IF (Comp CP = 0, (SP-CP)/SP*100, (SP-ConfCP)/SP*100 )

In the future, try posting questions in the 'Q&A' forum. The 'Discussion' forum is for matters of general discussion, not specific problems in search of a solution. The 'Water Cooler' is for non-technical discussions. You can submit a question to 'Q&A' here:

http://www.techrepublic.com/forum/questions/post?tag=mantle_skin;content

There are TR members who specifically seek out problems in need of a solution. Although there is some overlap between the forums, you'll find more of those members in 'Q&A' than in 'Discussions' or 'Water Cooler'.

Be sure to use the voting buttons to provide your feedback. Voting a '+' does not necessarily mean that a given response contained the complete solution to your problem, but that it served to guide you toward it. This is intended to serve as an aid to those who may in the future have a problem similar to yours. If they have a ready source of reference available, perhaps won't need to repeat questions previously asked and answered. If a post did contain the solution to your problem, you can also close the question by marking the helpful post as "The Answer".

## Related Discussions

• 1

DEABSTRACT ·

• 2

• 2

#### Need your opinions on Databases for a project of mine, think you an help

Plushy Bunno ·

• 0

garryknott ·

• 0

#### Is it better to implement the UTMStack free Next-Gen SIEM tool or hire any

castlegrace72 ·