if/then again

  • Thread starter Thread starter steven
  • Start date Start date
S

steven

i know the standard if then goes - if this then that. i
was wondering if you can go - if this then that and that?
thx
 
Steven,

Perhaps you could put more flesh on the example.

If this, then that and that?

B1=if(A1=5, 6, 8)

There B1 can only have one value. You can choose what values you have in
the formula, but it makes no sense to say, if A1=5, then B1 equals 6 and 9.

However, with VBA, you could say,

If A1=5, then set
B1=4
C1=5
D1=6
E1=7

and if A1 <>5, then
B1=0
C1=0
D1=0
E1=0

So it all depends on the context. If it is a formula, then a single cell
can only hold one value.

If you want more cells set, then you need more formulas, one for each cell.

If you are using VBA, then you have much greater freedom.

I am not sure if I answered your question, but I hope I have given you some
food for thought.

Best regards,
Kevin




steven wrote...
 
Back
Top