Problem with finding two values.

Mike Neal

New Member
Joined
May 24, 2020
Messages
38
Office Version
  1. 2013
Platform
  1. Windows
I am new to VBA and am trying to write a macro that will search for a value that is in a UserForm text box which will always be in row 1 on my excel sheet and then search the column that the value is found in for a value from a ComboBox in the same Userform. After finding the value from the ComboBox I want to clear it from the cell by clicking a command button. I also have a second ComboBox that I would like to use to add a value to the next empty cell in the column found from the same text box by clicking a different command button. The text box is a machine ID number and the the first ComboBox has a list of maintenance tasks assigned to that machine which I would like to be able to select one and remove . The second ComboBox has a list of all the possible maintenance tasks that could be assigned to the machine and I would like to able to select one and add it. I have been able to use Find to get the first value but have not been able to use select that column and search it for the second value. Any help would be appreciated. Thank you.
 
That's right, you have to put a button, press the button and voila, you will have the load in the combo.
I did that and it worked great. Then I changed it to a DropButtonClick for the combobox that I have the values go in and am calling the macro from it. Works really. Thanks again for the help.
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Now I am trying to use a combobox that has Departments (these are all in row 2 in my spreadsheet) select a Department and search for all occurrences. Then take the resulting columns and get the Equipment Id (which is in row 1) and populate a second combox with the IDs so I can select one and click a command button to delete that entire column and remove that Equipment from the spreadsheet. Also have the cells shift left. So far I have been able to search and return the result of the first occurrence and have it show up in the combobox drop down but no luck getting the other occurrences or selecting the column to delete.
 
Upvote 0
Now I am trying to use a combobox that has Departments
Sounds like a different requirement than this thread.
Create a new thread for each requirement so you will have the opportunity for more experts to see your thread and help you.
I recommend adding examples, data, images, and data ranges with the XL2BB tool in your explanations, that way it will be easier to understand what you need.
 
Upvote 0
Sounds like a different requirement than this thread.
Create a new thread for each requirement so you will have the opportunity for more experts to see your thread and help you.
I recommend adding examples, data, images, and data ranges with the XL2BB tool in your explanations, that way it will be easier to understand what you need.
Ok. Thank you.
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,605
Members
449,038
Latest member
Arbind kumar

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