Formula template change to vba code for userform help

Patriot2879

Well-known Member
Joined
Feb 1, 2018
Messages
1,259
Office Version
  1. 2010
Platform
  1. Windows
Hi I have this formula below which works on a template I have but I want to add this into my userform1.
My range is in sheet called ‘Data’ A1:R17 and the AC3 (Match) is now ComboBox2 and AC4(Match) is now ComboBox1 and I want the result to go into TextBox53

Code:
=IFERROR(INDEX($A$1:$R$17,MATCH(AC3,$A$1:$A$17,0),MATCH(AC4,$A$2:$R$2, 0)),"")
[FONT=Times New Roman][/CO[/FONT]DE]


My userformis called ‘UserForm1'.


 

Please canyou help me to put this into vba code to go into TextBox53.

 

ComboBox1 is Dates and ComboBox2 is areas what it is cross referencing to find the number in a cell A1:R17

 

And the A2:R2is the dates which is in ‘Data’ and this corresponds to my combobox1.

 

Hope you can help please.


[/COLOR][/SIZE][/FONT]
 
Last edited:

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,223,911
Messages
6,175,327
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