Questions tagged [iif-function]

IIf is a language function to perform an immediate or inline conditional assignment.

IIf is an abbreviation variously for Inline If or Immediate If and is available in many programming and script languages, IIf is implemented as a Function which means it returns a value. In code, these typically take the form:

result = IIf(condition, TruePart, FalsePart)

The value of result afterwards depends on the evaluation of condition.

A multi-line If block could perform the same action but would be an If Statement. The statement form could include any number of other actions such as invoke other methods. On the other hand, IIf simply results in a conditional assignment and cannot invoke other code.

Some languages also support a 'conditional operator', sometimes called a ternary operator, which works similar to IIf, but may offer other benefits.

94 questions
-2
votes
1 answer

Excel: If functions

I would like to work out the below but I couldn't figure it out yet: For a specific date, I would like to know what is the average price of the data collected starting from 2 minutes after Time (T) -i.e Looking for the date 01/01/2018 08:30 the…
Paolina
  • 3
  • 4
-2
votes
2 answers

Dynamic range into standard deviation formula

I need to calculate the standard deviation of returns in excel. I have monthly returns for a group of companies; lets say for company A, I have months 1 to 12 in 1995 and 1996 but for 1997 only months 1 to 7. I have a group of 2000 companies, they…
-2
votes
1 answer

how loop if function in VBA

How to repeat the if function in a vba code Hello, all I create a command line using if on a form. But I have trouble writing it over and over again. Is there a proper way to simplify this writing? If UserForm1.checkbox15.Value = True…
-2
votes
2 answers

excel if function does not work

I have some problems with the if function in excel. I have a set of data I would like to build the average only with some special values. The data is in two columns and the average should be build from column2 if 95if function. If I try a example…
Froop
  • 99
  • 8
1 2 3 4 5 6
7