Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - If / And Statements

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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
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!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF OR Statements Paul Excel Discussion (Misc queries) 4 May 4th 10 05:08 PM
If statements Lou825 Excel Discussion (Misc queries) 3 April 7th 10 03:52 AM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
IF Statements...I think kevinknight09 Excel Worksheet Functions 2 August 2nd 06 09:03 PM
operator statements, shorting when reusing one of the statements? KR Excel Programming 1 August 4th 05 06:20 PM


All times are GMT +1. The time now is 03:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"