Is there such a thing as an "if" command in excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In DOS programmes there is an "if" command,which puts figures in a particular
column depending on the number you put in the "if" column. is there any way
that i can do this in an excel spreadsheet?
 
Yes.

The format is:
=IF(criteria, result if true, result if false)

Type in =IF and hit Ctrl+A for help.

Hope this helps.
Andy.
 
Yes ...

=IF(condition, result if True, result if False)

e.g.

=IF(A1>B1,"ABC","DEF")

If A1>B1 result is "ABC" otherwise it is "DEF"

ABC/DEF could be replaced by cell references/formulae

HTH
 
Thank you.

So if say I wanted to do a formula for example so that

If column B10 = 1 the figure from A10 will go into C10
If column B10 = 2 the figure from A10 will go into D10
If column B10 = 3 the figure from A10 will go into E10 etc etc what would
the formula be for that?

Thanks
 
Actually, one thing you could do which would not require VBA coding is the
following.

In cell C10: =IF(B10=1,A10,"") --> means "if the value in B10 is 1, THEN
input the value in A10, ELSE, do nothing."
In cell D10: =IF(B10=2,A10,"")
In cell E10: =IF(B10=3,A10,"")

etc.

Dave
 

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