Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   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 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using IF statements in conjunction with other function meggie Excel Worksheet Functions 1 August 25th 09 08:37 AM
How can I use an IFISNUMBER formula in conjunction with Vlookup? Dan Excel Worksheet Functions 6 January 3rd 09 02:46 AM
how to move lines in conjunction with graphs Shoque Charts and Charting in Excel 4 July 25th 06 02:07 PM
Using IF & AND command in conjunction KDD Excel Discussion (Misc queries) 7 August 25th 05 04:11 PM
Wildcard in conjunction with data comparison Tom Excel Programming 3 August 4th 03 02:24 PM


All times are GMT +1. The time now is 05:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"