Constructing a booking system for a restaurant using IF

Thanks:  0
Likes:  0

# Thread: Constructing a booking system for a restaurant using IF

1. ## Constructing a booking system for a restaurant using IF

Hi there, im new here but i was wondering if I could get some help please?

Im constructing a spreadsheet that will be used by a restaurant for bookings, adding items to bills etc. I have all the table capacities grouped together in blocks, e.g. and the tables that can take 2 people, 4, 6, 10 etc. Ive made a form that allows the user to select a time for booking e.g 7:45 and the active cell become the first table of 2 under that time. I then have a message box that promts the user to enter in the number of people that are in the group and then the name of the group, this information will then hopefully be input into the spreadsheet in the appropriate areas. How can i use an IF statement to say if the number entered is 2 or less go to cell, if its 3 or 4 go to cell etc? The other problem with this is that it needs to be able to recognise if there is already a booking, say i have four tables of two, and one is already booked, how do i make it go to the next available slot?
If anyone can throw me some info on the subject then i'd really appreciate it. Thanks, Scuzz

2. ## Re: Constructing a booking system for a restaurant using IF

You are probably looking for an event-activated macro, one that will fire on changes made to party number and time. Look around for Worksheet_Change macros and see if they are the kind of thing you'd like. If so, post back with more details about the locations of your data.

3. ## Re: Constructing a booking system for a restaurant using IF

I dont quite understand what im meant to be looking for
I cant get my method to work as well as i wanted but ive come up with something that is close enough. Just one thing, i have two colums, column A has numbers in it e.g 2,4,6,10 and column B has a validation check to prevent a number being entered in column B that is larger than the number it is beside

A B
2 2
2
4 3
4
6
6

If i was to try and put a 7 beside a six then it would give me an error message. How can i maintain this validation check when using an inputbox? For some reason the inputbox bypasses the validation check and i cant figure out why.
Any advice you could offer would be appreciated!

4. ## Re: Constructing a booking system for a restaurant using IF

TommyGun's comments here -- http://www.mrexcel.com/board2/viewto...box+validation -- might get you straightened out.

5. Yeah thats helpful! thanx for taking the time to look over my problem!
Scuzz

6. ## Re: Constructing a booking system for a restaurant using IF

You're welcome and a belated Welcome to the board!

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•