View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jason S. Jason S. is offline
external usenet poster
 
Posts: 4
Default VBA - If / And Statements

A benefit to backing this worksheet with VBA is delete button casualties.
Yet conditional statements can be used in cell formulas. Make sure you copy
the formula, in the event of a mishap. IF/IIF statements are not complicated.
They are simple decisions. IF (based on this criteria) THEN (do these things)
ELSE (do these things) END IF;;;Likewise =IIF(criteria,do these,else do these)

You can pair criteria using boolean operators :
AND - conjoing criteria
OR - either criteria

E1: IIF((C=?) AND (D=?), round(C), round(C)+1)




"Becky" wrote:

I am very green to vba so I am not sure how to do this...but since all

I can figure is avery complicated nested IF statements, I thought maybe

VBA is where is belongs.

We have a spreadsheet where depending on what size is put in column C
and Column D, we want it to group 1 way in column e and another way in
column f (mosty rounding two different ways)


example
C D E F
<5 Outpatient 6 12
12.2 Inpatient 14 18
23.7 Inpatient 24 26
16.5 Inpatient 17 18


Can anyone help with this or give me a better suggestions to do this?
Many thanks!