+ Reply to Thread
Results 1 to 4 of 4

Using row() in conjunction with a column number.

  1. #1
    Tim
    Guest

    Using row() in conjunction with a column number.

    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?

  2. #2
    Dave Peterson
    Guest

    Re: Using row() in conjunction with a column number.

    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

  3. #3
    Tim
    Guest

    Re: 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
    >


  4. #4
    Dave Peterson
    Guest

    Re: Using row() in conjunction with a column number.

    How were you applying your original formula?

    If you were just typing it in, then you could always just type that formula in
    the top cell in the range and drag it down.

    Tim wrote:
    >
    > 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
    > >


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1