Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compare listbox in userform with excel sheet

Status
Not open for further replies.

vijay2482

MIS
Mar 17, 2009
5
FR
hi,

i have two excel sheets say sheet1 and sheet2
now i want to check if the items in the listbox has a matching in sheet1 columnA and sheet2 columnA
two conditions to check:
1)if the items in the listbox are not in both the sheets
2)if the items in the listbox is not in sheet1 but in sheet2

these two conditions has to be checked and if they are true, a warning message has to be set, saying that this item in the listbox is not in both the sheets or this item in the listbox is not in sheet1 but in sheet2

how to obtain this?

thanks in advance
 
What have you got so far?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
i have created the userform,which has a textbox,listbox,add and remove buttons
i enter text in text box,click add.
the value in the textbox is added in the listbox...
and on selecting an item from the listbox and clicking the remove button will delete that particular item from the listbox

i have a button called check which has to check the above conditions....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top