Ctrl+Shift+Enter in VBA

Roderick_E

Well-known Member
Joined
Oct 13, 2007
Messages
2,051
Ok this sounds weird but I need to know if there is a way to do a ctrl+shift+enter (array) in VBA. I often use application.match in my VBA and want to use it for multiple criteria so I can get the row number match. How do I do this? Thanks

Multiple criteria match in basic formula:

Code:
=match(1,(string1=range1)*(string2=range2),0)

This fails in VBA


Edit: P.S. I also tried application.match(string1 & string2, range1 & range 2,0)

 
Last edited by a moderator:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Ok finally. I had to take the static elements of the string to evaluate and combine them with the dynamic then evaluate
Code:
evalstr = "static stuff wrapped in quotes" & dynamic & "more static"
sheet#.evaluate(evalstr)

Works great! Thanks for all the help. I'll be using this method for year :-)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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