Condtional operators & moving the results of formulas

  • Thread starter Thread starter Mtaylor
  • Start date Start date
M

Mtaylor

I am relatively new to building Macros in Excel.
Is there a functio I can use to move the result of a
formula into a particular column.

I am comparing the output of a simple formula

=SUM(C12:ax12)/24 against 3 values
25. 25-60, and >60

based on the output of this formula the results wil be
placed in one of 3 columns. First there is a simple
calculation followed by a comparision, and then a physical
move of the results(based on the comparision).

My question is what function should I use to do the
comparision, and the physical move.
 
Mtaylor said:
I am relatively new to building Macros in Excel.
Is there a functio I can use to move the result of a
formula into a particular column.

I am comparing the output of a simple formula

=SUM(C12:ax12)/24 against 3 values
25. 25-60, and >60

based on the output of this formula the results wil be
placed in one of 3 columns. First there is a simple
calculation followed by a comparision, and then a physical
move of the results(based on the comparision).

My question is what function should I use to do the
comparision, and the physical move.

I try to keep my spreadsheet formulae simple, so put

=SUM(C12:ax12)/24

in column BA,



Then in column BB put

=If (BA12=25,BA12,"")


In column BC put

=If (And(BA12>25,BA12<=60),BA12,"")

And in BD put

= If (BA12>60,BA12,"")

Regards


Geoff
 
-----Original Message-----



I try to keep my spreadsheet formulae simple, so put

=SUM(C12:ax12)/24

in column BA,



Then in column BB put

=If (BA12=25,BA12,"")


In column BC put

=If (And(BA12>25,BA12<=60),BA12,"")

And in BD put

= If (BA12>60,BA12,"")

Regards


Geoff


.
Geoff: I appreciate your help with this- very much.


What is the purpose of the And function is the second
formula?

Thank you,
mtaylor
 
MTaylor

The AND function checks the listof tests (separated by commas) and if all
are TRUE it returns a TRUE status. If any are FALSE, then FALSE is returned.
The line, therefore, checks that BA12 is greater than 25 AND that BA12 is
less than or equal to 60.

Andy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top