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? |
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 |
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 |
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 |
All times are GMT +1. The time now is 06:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com