+ Reply to Thread
Results 1 to 17 of 17

Format control data - values to be input differently on different tabs

  1. #1
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Format control data - values to be input differently on different tabs

    Hi guys,

    I have a spreadsheet I am using to track holidays on. I am learning to use format control and index match etc.

    I need seperate tabs which you can see whereby i have setup 'April 2019' and 'May 2019' and a tab called holiday sheet.

    Can anyone help me with inputting the dates into the holiday tab whereby, if i inset date - to date in April (after selecting April using the format control box on the holiday tab) the figure for April is populated on the holidays column in the April 2019 tab

    Similarly if I insert another range of dates of holiday on the holiday sheet tab for the month of may, the number of days off is inserted into the may 2019 tab against john smith. Sheet attached!

    Thank you guys!
    Attached Files Attached Files
    Thanks,

    R.



  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Format control data - values to be input differently on different tabs

    Hi

    Try to see if this video helps you.
    https://www.youtube.com/watch?v=5pdcLTwkn5s

  3. #3
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Format control data - values to be input differently on different tabs

    Hi Jose

    Sadly this is not what i required

    I have the dates already, I just need the number of days for each month that john smith is on holiday to be reflected on the relevant month's tab. Thanks for sending this though

  4. #4
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Format control data - values to be input differently on different tabs

    Quote Originally Posted by José Augusto View Post
    Hi

    Try to see if this video helps you.
    https://www.youtube.com/watch?v=5pdcLTwkn5s
    Hi Jose

    Sadly this is not what i required

    I have the dates already, I just need the number of days for each month that john smith is on holiday to be reflected on the relevant month's tab. Thanks for sending this though

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Format control data - values to be input differently on different tabs

    Hi

    Your sheets April and May has different layout. To avoid different formulas you need use only one of them.
    Adjust the range in holidays sheet as you need.

    In 'April 2019' Use in B2 (adjust range and drag down)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In 'May 2019' sheet use in C2 (adjust range and drag down)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Format control data - values to be input differently on different tabs

    Quote Originally Posted by José Augusto View Post
    Hi

    Your sheets April and May has different layout. To avoid different formulas you need use only one of them.
    Adjust the range in holidays sheet as you need.

    In 'April 2019' Use in B2 (adjust range and drag down)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In 'May 2019' sheet use in C2 (adjust range and drag down)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hi Jose,

    Thank you this.

    However i think the problem is linked with the date ranges. If i input two dates, and change the month from april to may or vice-versa on the holiday sheet tab, the dates are not changing? therefore it looks like the holiday numbers are staying the same on the april and may 2019 tab!

    any suggestions please?

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Format control data - values to be input differently on different tabs

    Try the following modifications
    For April: =SUMPRODUCT(('Holiday Sheet'!$A$3:$A$100=A2)*(MONTH('Holiday Sheet'!$B$3:$B$100)=4)*'Holiday Sheet'!$D$3:$D$100)
    For May: =SUMPRODUCT(('Holiday Sheet'!$A$3:$A$100=B2)*(MONTH('Holiday Sheet'!$B$3:$B$100)=5)*'Holiday Sheet'!$D$3:$D$100)
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Format control data - values to be input differently on different tabs

    Quote Originally Posted by JeteMc View Post
    Try the following modifications
    For April: =SUMPRODUCT(('Holiday Sheet'!$A$3:$A$100=A2)*(MONTH('Holiday Sheet'!$B$3:$B$100)=4)*'Holiday Sheet'!$D$3:$D$100)
    For May: =SUMPRODUCT(('Holiday Sheet'!$A$3:$A$100=B2)*(MONTH('Holiday Sheet'!$B$3:$B$100)=5)*'Holiday Sheet'!$D$3:$D$100)
    Let us know if you have any questions.
    Hi Jetemc

    Thank you for your reply. The dates don't change on the holiday sheet tab therefore the number of days remain the same and subsequently this is still showing for april and for may. Can you please advise? thank you

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Format control data - values to be input differently on different tabs

    As seen in the attached copy of the file the formulas display 2 in April 2019!B2 and 0 in May 2019!C2.
    Let us know if you have any questions.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Format control data - values to be input differently on different tabs

    Hi JeteMc

    This seems to work partially!

    So it is calculating April and May dates

    However, I want to achieve if i select April from the dropdown on the holiday sheet, i should have april dates inserted - which feeds into the april tab (number of days off)

    If i select the May from the dropdown on the holiday sheet, I should have dates for may inserted - which feeds into the may tab (number of days off)

    Please advise. Thank you!!

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Format control data - values to be input differently on different tabs

    It sounds as if the dates April 11, 2017 and April 13, 2017 should change to May 11, 2017 and May 13, 2017 when May is selected in the control form on the Holiday sheet. If that is the case the formulas for B3 and C3 respectively are:
    B3: =DATE(2017,$J2,11)
    C3: =DATE(2017,$J2,13)
    Let us know if you have any questions.

  12. #12
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Format control data - values to be input differently on different tabs

    Quote Originally Posted by JeteMc View Post
    It sounds as if the dates April 11, 2017 and April 13, 2017 should change to May 11, 2017 and May 13, 2017 when May is selected in the control form on the Holiday sheet. If that is the case the formulas for B3 and C3 respectively are:
    B3: =DATE(2017,$J2,11)
    C3: =DATE(2017,$J2,13)
    Let us know if you have any questions.
    Hi JeteMc,

    Unfortunately not. I will explain my request again..

    On the format control, on the holiday sheet tab, if i select april, I want to input date for april ONLY: i.e. 01/04/2019 - 10/04/2019. This is 9 days in total for april, which should be calculated on the April 2019 tab

    If I select May from the format control on the holiday sheet tab, I want to input a date for May only i.e. 01/05-2019 - 06/05/2019. This is 5 days intotal for may, which shou;d be claculated on the may 2019 tab.

    Hope this makes sense! thank you!!

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Format control data - values to be input differently on different tabs

    Sounds as if you want all of your input to go into cells B3:C3 on the Holiday sheet and have to output (D3) sent to the appropriate month based on the format control value. Unfortunately, if my understanding is correct, I don't believe your goal can be accomplished using formulas. Although I am not knowledgeable of VBA I am doubtful of that also.
    My suggestion is that you fill down columns B:D on the Holiday sheet and use the formulas from post #7 as modeled on attachment.
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Format control data - values to be input differently on different tabs

    Quote Originally Posted by JeteMc View Post
    Sounds as if you want all of your input to go into cells B3:C3 on the Holiday sheet and have to output (D3) sent to the appropriate month based on the format control value. Unfortunately, if my understanding is correct, I don't believe your goal can be accomplished using formulas. Although I am not knowledgeable of VBA I am doubtful of that also.
    My suggestion is that you fill down columns B:D on the Holiday sheet and use the formulas from post #7 as modeled on attachment.
    Hi JeteMC,

    Thank you for this.

    Do you think if I accept your solution, you can help me achieve this.

    If I input dates for john smith on the holiday sheet tab, i.e. 01/04/2019 - 06/04-2019 = 5 days, can this be input onto the april tab? similarly ont he holiday sheet tab if i write john smith 01/05/2019 - 07-05/2019 = 6 days, this should be input onto the may tab? i don't want to list all the vetters ion all tabs as there are too many. hope you can help

  15. #15
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Format control data - values to be input differently on different tabs

    Yes, the array entered formula* that populates the 'Name' column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The formula that populates the 'Holidays' column remains pretty much the same.
    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Format control data - values to be input differently on different tabs

    Quote Originally Posted by JeteMc View Post
    Yes, the array entered formula* that populates the 'Name' column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The formula that populates the 'Holidays' column remains pretty much the same.
    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    tHANK you JeteMC. This seems pretty good! thank you so much. rep added :-)

  17. #17
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Format control data - values to be input differently on different tabs

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Code working only for a standard input. If input changes then code behaves differently
    By DhanyaTeacher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2018, 12:41 AM
  2. Checkbox using Format Control and copying control values
    By bigapple14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2014, 09:28 AM
  3. How to control cursor with variable input values
    By Petrocelli99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2014, 02:01 PM
  4. Is there a way to have row data move between tabs but input in a new order?
    By Alexander.Tartter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2013, 12:58 PM
  5. Control Autofilter Tabs with Data Validation list box Value
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2010, 10:15 AM
  6. Input to Master and Have Multiple Slaves Each Sort That Data Differently
    By AmeriKen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-11-2009, 10:07 AM
  7. Copy input range and paste into Format Control
    By Tibby in forum Excel General
    Replies: 2
    Last Post: 10-28-2008, 04:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1