Multiple Title Search in Cells

roc_ent

Active Member
Joined
Jan 27, 2003
Messages
252
Office Version
  1. 2019
Platform
  1. Windows
Hi everyone,

I'm trying to design an expense form on Sheet 2 and I have 4 types of expenses in a drop down list in merged cells F-G17 with "categories" of Office, Executive, Meeting, Conference.

What I would like to do is once they choose the "category" of their expenses, merged cells I-O17 would populate another drop down list for different accounts of expenses (IE hotel, meals, etc) and in merged cells Q-R17 it would populate the account to be credited to.

All my tables with with names and account numbers are located in a table on sheet 3.


Is this at all possible, and if so how can I format this?

Thanks for your time in reading this.
 

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.
It seems I broke a rule by linking to a video explaining my solution so let me try and describe it here.

The reference data is on Sheet3 in Excel tables, as described.
Each Table is then selected and Formulas, Create from Selection used to give each a name using the heading (paying attention that Names can't have spaces, hyphens, etc). The accounting code name must be the first character of that Category followed by the text "code".

Sheet3
Category
Office
OcodeExecutiveEcodeMeetingMcodeConferenceCCode
OfficeStaplesO6653-44Private JetE9982-11CoffeeM9292-11HotelC7732-21
ExecutivePaperO6653-88MassageE9982-01CakeM9292-55Hire CarC7732-43
MeetingStamps
O6653-77Private BoxE9982-44ProjectorM9292-25BreakfastC7732-76
ConferenceStringO6652-92OperaE9982-91FlipchartM9292-65Per DiemC7000-01
Cups
O6653-12Laser PointerM9292-22

<colgroup><col><col><col><col span="3"><col><col span="2"><col><col span="2"><col><col></colgroup><tbody>
</tbody>

The Expense Type LoV is created using Data, Data Validation, List and in the Source =Category so it picks up the entries from the Category table.

The Expense Account LoV is created using Data, Data Validation, List and in the Source is =INDIRECT($F$17) so in this example it takes the selected text "Conference" and INDIRECT treats it as a name to the Conference table so we get the dropdown Hotel, Hire Car, Breakfast, Per Diem.

For the Expense Account Code we INDEX into the correct Account Code table by constructing an Excel Name of the first letter of the Category (so that's why we named the account code tables OCode, ECode, MCode and CCode) and append the text "code" which then INDIRECTly access the correct accounting code teable (in this case CCode).
Then we get the row by MATCHing INDIRECTly the Expense Account row which matches.

=IFERROR(INDEX(INDIRECT(LEFT(F17,1)&"code"),MATCH(I17,INDIRECT(F17),0)),"")

Sheet2
Expense Type LoVExpense Account LoV
Expense Account Code
ConferenceHire Car
C7732-43

<colgroup><col span="3"><col span="6"><col span="3"><col></colgroup><tbody>
</tbody>
 
Upvote 0
THANK YOU!!!! ever so much! I'm sorry to hear that you were broke a rule by posting this video, however, Mr. Excel Moderators should be aware of something quite interesting relating to your video. As I was doing selling skills seminars in my "hay days" there are different teaching methods where individuals learn at the best. One is Practical where the student must work at it to understand it. The second is Audio when the student hears it being explained and that is all they need to be successful. The last method is a combination of both, which in my case is my best method of learning. In praising your video and the time you took to show and explain it will make me learn and use this much more than what you described in the written format.

I strongly believe that this site is to help one-another, and if posting a video will help me understand and learn versus simply reading it, trying it, and forget about it because I can't figure it out. Therefore, what is the harm in providing those that want to learn more about Excel, being supplied with the tools they need to succeed.

I hope the Moderators will read this comment and reflect on it. I'm certainly open to receiving any feedback they might have in regards to my reply to you and your video. Again, Thank You so much. You've helped me to help a non profit organization with keeping track of their expenses. Job well done, and what must be obvious by now, your answer was "bang on".
 
Upvote 0
You're welcome!

I agree with you about the video (that's why I created it!) but I also understand that the MrExcel group spend time and money maintaining this resource and want their forums to be a repository of solutions, not just an index into solutions held elsewhere.

I did two videos today and a system administrator, Fluff, pointed out Rule #4 so I've added textual descriptions of my proposed solution on both answers. I also answered a third simpler question today which needed no further explanation.

I've used the MrExcel forums for a few years but must have forgotten that rule. When the solution is relatively complex and difficult to describe then I know a video helps so in future if I answer a question here I'll make sure and give a textual response along with the text of any formulae although I may add a video at the end if I think it is warranted. I'll see if the system admins find that acceptable.

Regards, Toadstool
P.S. The YouTube videos are all Unlisted so cannot be found with a YouTube search because I'm not trying to create my own video library. The link from this forum is the only way to find it. I guess the only concern for the future is what happens with my videos after I pop my clogs as Google may remove Inactive accounts if not used for 6 months or more.
 
Upvote 0
I hope the Moderators will read this comment and reflect on it.
I have, and Toadstool has already pointed out some of the reasons for the rule. In case you haven't read the rule mentioned, the last paragraph states
To that effect, do not simply create a file with a solution, and provide a link to that. Some of the issues with providing links to files uploaded to the internet are: those links often expire, many users cannot download files from file-sharing sites due to network security restrictions, many users are reluctant to download files for personal security reasons and the ability to search the forum effectively is reduced.
I have highlighted the word 'simply' to emphasise the fact that the rule is not saying that you cannot post a link to your video, it is indicating that you should not only do that. Toadstool has already mentioned that we want the forum to be a repository of solutions. More than that, we want it to be a searchable repository. If this thread has stopped at post 2 and later a forum member was searching for, say, Table, Data Validation, INDRIRECT etc they would not have found this thread which may be of use to them. Further such links are often rendered useless well before somebody "pops their clogs" as they may have a time-limit expiry or the member removes the target file to free up space or some other reason.
 
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,672
Members
449,045
Latest member
Marcus05

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