Index: src/func.c
===================================================================
--- src/func.c	(revision 17073)
+++ src/func.c	(working copy)
@@ -1029,6 +1029,7 @@
 	int	 *iter_item = NULL;
 	int argc;
 	GnmExprConstPtr *argv;
+	static GnmFunc *fn_if, *fn_if2;
 
 	g_return_val_if_fail (ei != NULL, NULL);
 	g_return_val_if_fail (ei->func_call != NULL, NULL);
@@ -1053,6 +1054,15 @@
 		      (flags & GNM_EXPR_EVAL_PERMIT_NON_SCALAR))
 		? 0 : -1;
 
+	if (fn_if == NULL) {
+		fn_if = gnm_func_lookup ("if", NULL);
+		fn_if2 = gnm_func_lookup ("if2", NULL);
+		gnm_func_load_if_stub ((GnmFunc *)fn_if2);
+	}
+
+	if (fn_def == fn_if && iter_count == -1)
+		return fn_if2->fn.nodes (ei, argc, argv);
+
 	for (i = 0; i < argc; i++) {
 		char arg_type = fn_def->fn.args.arg_types[i];
 		/* expr is always non-null, missing args are encoded as
Index: plugins/fn-logical/plugin.xml.in
===================================================================
--- plugins/fn-logical/plugin.xml.in	(revision 17073)
+++ plugins/fn-logical/plugin.xml.in	(working copy)
@@ -16,6 +16,7 @@
 				<function name="xor"/>
 				<function name="not"/>
 				<function name="if"/>
+				<function name="if2"/>
 				<function name="iferror"/>
 				<function name="true"/>
 				<function name="false"/>
Index: plugins/fn-logical/functions.c
===================================================================
--- plugins/fn-logical/functions.c	(revision 17073)
+++ plugins/fn-logical/functions.c	(working copy)
@@ -303,6 +303,40 @@
 		return value_new_int (0);
 }
 
+static GnmValue *
+gnumeric_if2 (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
+{
+	gboolean err;
+	int i, branch;
+	GnmValue *args[3];
+	GnmValue *res;
+
+	if (argc == 0 || argc > 3)
+		return value_new_error_VALUE (ei->pos);
+
+	res = gnm_expr_eval (argv[0], ei->pos, 0);
+	if (VALUE_IS_ERROR (res))
+		return res;
+	args[0] = res;
+
+	branch = value_get_as_bool (args[0], &err) ? 1 : 2;
+	for (i = 1; i <= 2; i++) {
+		args[i] = argc > i
+			? (branch == i ?
+			   gnm_expr_eval (argv[branch], ei->pos, 0)
+			   : value_new_empty ())
+			: NULL;
+	}
+
+	res = gnumeric_if (ei, (GnmValue const * const *)args);
+
+	for (i = 0; i <= 2; i++)
+		if (args[i])
+			value_release (args[i]);
+
+	return res;
+}
+
 /***************************************************************************/
 
 static GnmFuncHelp const help_iferror[] = {
@@ -389,6 +423,10 @@
 	  gnumeric_if, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_SECOND,
 	  GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
+	{ "if2", NULL, N_("condition,if true,if false"), help_if, NULL,
+	  gnumeric_if2, NULL, NULL, NULL,
+	  GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_SECOND,
+	  GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
 	{ "iferror", "EE", N_("value,value"), help_iferror,
 	  gnumeric_iferror, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
