ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Creating a specific formula (https://www.excelbanter.com/new-users-excel/19326-creating-specific-formula.html)

booroni

Creating a specific formula
 
I need to create a formula that checks to see that the text in 2 different
cells are supposed to be what the formula specifies before it calculates the
sum of 2 other cells
ie..
cell A1 = "Last"
cell B1 = "First"
cell C1 = "25"
cell D1 = "75"

The formula needs to be sure that cells a1 and b1 contain those exact words
otherwise it will give a response of "0"....but if they do contain those
exact words than the response would be the sum of cells c1 and d1....."100"

How do I write this formula correctly?

Max

One way

Put in E1:

=IF(AND(TRIM(A1)="Last",TRIM(B1)="First"),SUM(C1:D 1),0)

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"booroni" wrote in message
...
I need to create a formula that checks to see that the text in 2 different
cells are supposed to be what the formula specifies before it calculates

the
sum of 2 other cells
ie..
cell A1 = "Last"
cell B1 = "First"
cell C1 = "25"
cell D1 = "75"

The formula needs to be sure that cells a1 and b1 contain those exact

words
otherwise it will give a response of "0"....but if they do contain those
exact words than the response would be the sum of cells c1 and

d1....."100"

How do I write this formula correctly?




booroni

That worked perfectly....thank you. Thanx for the fast response too.

"Max" wrote:

One way

Put in E1:

=IF(AND(TRIM(A1)="Last",TRIM(B1)="First"),SUM(C1:D 1),0)

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"booroni" wrote in message
...
I need to create a formula that checks to see that the text in 2 different
cells are supposed to be what the formula specifies before it calculates

the
sum of 2 other cells
ie..
cell A1 = "Last"
cell B1 = "First"
cell C1 = "25"
cell D1 = "75"

The formula needs to be sure that cells a1 and b1 contain those exact

words
otherwise it will give a response of "0"....but if they do contain those
exact words than the response would be the sum of cells c1 and

d1....."100"

How do I write this formula correctly?





Max

You're welcome !
Thanks for the feedback

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"booroni" wrote in message
...
That worked perfectly....thank you. Thanx for the fast response too.





All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com