index-Match in VBA?

dukeofscouts

Board Regular
Joined
Jan 19, 2009
Messages
146
I have userForm in one of my workbooks that I use often, and wanted to add a feature to it. As a user enters in a value into one of the two text boxs, the value of the third text box is loaded. txtBox1 selects the row, and txtBox2 selects the column, txtBox3 is the cell that is the intersection. So if a user types in the value of the cell A5 for txtbox1, then zz1 for txtBox2 the value of txtbox3 would be the value of zz5.

Obviously I'm working in the "change" event, and have an IF statement that blocks the firing if the other txtbox is null. Going in and doing couple loops to select the cell is not a hard method to write, but it would slow VBA a LOT. Rather, I'm wanting to know if there is a way VBA can "find" the row number and column number of the two values, then just do an activesheet.cells(txtbox1.value.row,textbox2.value.column).

Any suggestions?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,223,157
Messages
6,170,419
Members
452,325
Latest member
BlahQz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top