ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If Function for 2 calculations (https://www.excelbanter.com/excel-discussion-misc-queries/83860-if-function-2-calculations.html)

Linda Wilson

If Function for 2 calculations
 
I want the cell to do a calculation based on the contents of the preceeding
cell. If the preceeding cell contains R, I want it to complete one
calculation, but if the cell contains something different, I want it to
complete a different calculation.

Can anyone provide a suggestion for this?

Thank you.



Bryan Hessey

If Function for 2 calculations
 

in A2 put

=IF(OFFSET(A2,-1,0)="r",1+2,3+4)

This should work

--

Linda Wilson Wrote:
I want the cell to do a calculation based on the contents of the
preceeding
cell. If the preceeding cell contains R, I want it to complete one
calculation, but if the cell contains something different, I want it
to
complete a different calculation.

Can anyone provide a suggestion for this?

Thank you.



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=533970


MarkN

If Function for 2 calculations
 
Hi,

Try using an IF function, =IF(A1="R",A2*20%,A2*30%). In the function, A1="R"
is a logical test that evaluates to TRUE or FALSE. If A1="R", the logical
test evaluates to TRUE, and the calculation A2*20% will be returned to the
active cell. If A1 does not equal "R", the logical test evaluates to FALSE,
and the calculation A2*30% will be returned to the active cell.
--
Hope this helps,
MarkN


"Linda Wilson" wrote:

I want the cell to do a calculation based on the contents of the preceeding
cell. If the preceeding cell contains R, I want it to complete one
calculation, but if the cell contains something different, I want it to
complete a different calculation.

Can anyone provide a suggestion for this?

Thank you.




All times are GMT +1. The time now is 02:49 PM.

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