INDEX/MATCH style VBA code

albatross32

New Member
Joined
Feb 17, 2010
Messages
32
I need an INDEX/MATCH style VBA code. I am very novice at VBA so will gave basic details of my requirement in layman’s terms.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
I am working with a range Sheet2!Q3:R232
<o:p> </o:p>
In Column Q, one cell will = 1 and all other cells will = 0
<o:p> </o:p>
The entry of 1 into a column Q cell triggers a macro in Sheet1. I then need to confirm the macro trigger by inserting a 1 in column R in the same row.
<o:p> </o:p>
I therefore need code to tag on to the end of my Sheet1 macro which will basically say ‘find “1” in column Sheet2!Q and put “1” in the same row in column Sheet2!R’.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Try this snippet of code:

Code:
Sub ff()
    [Sheet2!Q3:R232].Find(1).Offset(, 1).Value = 1
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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