View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Using row() in conjunction with a column number.

I hate to feel this beginner at this, but how exactly do i apply that to
excel?

"Dave Peterson" wrote:

Maybe you can use .formular1c1

somecell.formular1c1 = "=if(rc2=r[1]c2,r[1]c4)"

if same row, column 2 (B) = row+1,column2, then row+1,column 4(D).

But you didn't say what should happen if there's not a match????

somecell.formular1c1 = "=if(rc2=r[1]c2,r[1]c4,"""")"

Notice that you double up on the quotes within the strings.

Tim wrote:

I am working with a large database and it would be too difficult to make a
function like "=if(b13253=b13254,d13254)". I am trying to find a way to do
something like this "=if (2.row()=2.row()+1,4.row()+1". where the 2's are
column b, and the 4 is column D. I am unaware of the correct syntax and
can't find anything on the web about it. Is this possible?


--

Dave Peterson