Combining data validation and custom forumla

RobV1

New Member
Joined
Dec 19, 2017
Messages
3
Hi I was wondering if anyone can provide some guidance with a problem I'm having.

I'm currently attempting to create a sheet to track staff leave from a table which is to be used as a default, but editable by user with a drop down.

So far I'm managed to use a nested vlookup and Hlookup to transfer data across between tables, but can't figure out how to add in the drop down when attempting to use the data validation element.

Perhaps easier with a few tables to explain:

This is the table i'm wanting to populate - called 'leave'

Date01/12/201702/12/201703/12/201704/12/201705/12/201706/12/2017
DayFridaySaturdaySundayMondayTuesdayWednesday
TM1
TM2

<tbody>
</tbody>

This is the default table value I want to use - called staff:
Date01/12/201702/12/201703/12/201704/12/201705/12/201706/12/2017
Column234567
TM11000.511
TM2NWD00NWD0.81

<tbody>
</tbody>

This is the list of Drop downs I wish to add to 'Leave' - called Hours
NWD
0
0.5
0.8
1

<tbody>
</tbody>

Sorry, thats a lot of text.

Table - staff - populates using drop downs, so far so good.
Table - leave - has the following nested lookup =VLOOKUP($A4,'Staff list'!$A$3:$H$62,HLOOKUP(B$3,'Staff list'!$A$1:$H$2,2,FALSE),FALSE) which populates the 'leave' table based on the 'staff' table, however, i want the 'leave' table to also include a drop down feature so that if there are changes to the standard week worked, these can be edited by user but within the defined limits of the 'Hours' table.

Unfortunately I've drawn a complete blank, I'm pretty sure I need to use the custom formula option in data validation but its not as straight forward as I would have hoped.

Unfortunately VBA isn't an option for me with this one either as i've absolutely no knowledge of VBA at present, nor do the intended users.

Please can anyone help? Thank you in advance.

Rob.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi, welcome to the board.

I've read your post a couple of times now and can't work out exactly what you want.

I'm guessing you want to control the available options in the data validation cell, in some kind of dynamic way.

This is probably do-able but it's difficult to be sure as I don't understand exactly what you want to do.

Please can you try and explain really clearly what you want this to do ?

Don't worry too much about explaining the real world application of your task - this is probably not that relevant to finding a solution.
Focus on your data, and describing as clearly as possible, what exactly you want to do with it.
 
Upvote 0
Hi Gerald,

Many thanks for coming back to me.

Essentially what I am trying to do is to 'overlay' a drop down on the default values.

So the table 'staff' provides the starting point. With the nested v/hlookup (=VLOOKUP($A4,'Staff list'!$A$3:$H$62,HLOOKUP(B$3,'Staff list'!$A$1:$H$2,2,FALSE),FALSE)) in the table 'leave', the values transpose across from the staff chart, below example works as present:

Date01/12/201702/12/201703/12/201704/12/201705/12/201706/12/2017
DayFridaySaturdaySundayMondayTuesdayWednesday
TM11000.511

<tbody>
</tbody>
What I'm struggling with is having obtained the correct 'default' values as above, how to retain these whilst having the ability to change the numbers using a drop down only. So for example, if TM1 normally works on Friday as above, but wants to take a short day/full days leave, I want to be able to apply a drop down option to amend the number to 0.5 or 0 (using the 'hours' chart as the data validation range).

Apologies, i'm not sure that I've clarified that overly....
 
Upvote 0

Forum statistics

Threads
1,215,493
Messages
6,125,128
Members
449,206
Latest member
burgsrus

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