Compare two column values and display the third column value from the excel based on list box input.
3 views (last 30 days)
Show older comments
i have a excel sheet which is having 3 columns each column is having the student information.
1st and 2nd columns are having the semester-I and semester-II status respectively like "pass", "Fail", "Distinction", "first", "second", "third class"..etc
In my GUI, i have two list box which is for sem-I and Sem-II marks. if i select any input from the both list box then it has to compare with the excel sheet row values.
once both the list box inputs are found in the excel sheet, then it has to display the 3rd column value as the output
for example
if i select "distinction" from 1st list box and "Fail" from 2nd listbox then it has to show the corresponding value from the 3rd column...
Answers (1)
Vishal Rane
on 23 Sep 2013
If you need to read data from excel and display it in the listbox:
- use xlsread to read data from the specific cells
- assign the data to the listboxes using set()
3 Comments
Vishal Rane
on 23 Sep 2013
All u need now is the selected values from the list boxes.
get(listbox_handle,'Value')
gives index of the selected element from the list.
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!