Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reverse search (VBA newbie)

Status
Not open for further replies.

indupriya9

Programmer
Oct 29, 2002
99
NZ
Hi there

I have a formula that matches the units in the 6th row of the current sheet with the worksheet named TraineeUnits.

The formula is as follows:

Code:
                formula = "=IF(ISERROR(MATCH(R6C,TraineeUnits!R" & unitStartRow & "C" & traineeUnitIndex & ":R" & unitEndRow & "C" & traineeUnitIndex & ",0)),"" "",IF(AND(VALUE(INDEX(TraineeUnits!R" & unitStartRow & "C" & traineeUnitIndex & ":R" & unitEndRow & "C" & traineeUnitIndex & _
                    ",MATCH(R6C,TraineeUnits!R" & unitStartRow & "C" & traineeUnitIndex & ":R" & unitEndRow & "C" & traineeUnitIndex & ",0)+1,1)*10)>=R[-" & 1 + traineeUnitIndex & "]C,VALUE(INDEX(TraineeUnits!R" & unitStartRow & "C" & traineeUnitIndex & ":R" & unitEndRow & "C" & traineeUnitIndex & _
                    ",MATCH(R6C,TraineeUnits!R" & unitStartRow & "C" & traineeUnitIndex & ":R" & unitEndRow & "C" & traineeUnitIndex & ",0)+1,1)*10)<=R[-" & traineeUnitIndex & "]C),R[-" & 3 + traineeUnitIndex & "]C,"" ""))"

The above works fine. But now I need to change it so that it matches with the 7th column instead of the 6th row of the current sheet. Here I know that I need to change the RC6 to something else. But not sure what? Can somebody let me know what the RC6 is please?

Thanks a lot in advance
ip
 
indupriya9,
R1C1-style notation, [tt]R6C[/tt] or [tt]R6C0[/tt] = Row + 6, Column + 0

If you want the 7th column instead of the 6th row [tt]RC7[/tt] or [tt]R0C7[/tt].

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top