Create my own formula?

J

james

I am using the nested functions below

"=if(vlookup(1, GRID, 3,false) = 0, (1, GRID, 4, false), (1, GRID, 3, false))"

i.e for the row with the digit one in its first column return the value in
the third column else if empty return the value in the fourth column.

my problem is i am repeatedly using the line above exactly only changing the
value i am searching for (1 in this case ))

so ideally i'd like to do something like

define myformula(X) = if(vlookup(X, GRID, 3,false) = 0, (X, GRID, 4, false),
(X, GRID, 3, false))

is this possible?????????
 
D

Daniel CHEN

Why not use the following one:

=IF(A1=1,C1,D1)

to get what you want:
[for the row with the digit one in its first column return the value in the
third column else if empty return the value in the fourth column].

Not quite sure what you want.

--
Best regards,
---
Yongjun CHEN
=================================
XLDataSoft - Data Analysis Expert, Excel/VBA Specialist
- - - - www.XLDataSoft.com - - - -
Free Excel-Based Data Processing Tool is Available for Download
Free Excel / VBA Training Materials is Available for Download
=================================
 
J

JLatham

james, like Daniel CHEN, I'm not quite sure what you're looking for, but keep
in mind that where you are using 1 you could use a reference to a cell that
contains the value 1. So if you put 1 in cell F1, for example, you could
rewrite the formula above as =IF(A1=$F$1,C1,D1)

Daniel CHEN said:
Why not use the following one:

=IF(A1=1,C1,D1)

to get what you want:
[for the row with the digit one in its first column return the value in the
third column else if empty return the value in the fourth column].

Not quite sure what you want.

--
Best regards,
---
Yongjun CHEN
=================================
XLDataSoft - Data Analysis Expert, Excel/VBA Specialist
- - - - www.XLDataSoft.com - - - -
Free Excel-Based Data Processing Tool is Available for Download
Free Excel / VBA Training Materials is Available for Download
=================================

james said:
I am using the nested functions below

"=if(vlookup(1, GRID, 3,false) = 0, (1, GRID, 4, false), (1, GRID, 3,
false))"

i.e for the row with the digit one in its first column return the value in
the third column else if empty return the value in the fourth column.

my problem is i am repeatedly using the line above exactly only changing
the
value i am searching for (1 in this case ))

so ideally i'd like to do something like

define myformula(X) = if(vlookup(X, GRID, 3,false) = 0, (X, GRID, 4,
false),
(X, GRID, 3, false))

is this possible?????????
 
Top