+ Reply to Thread
Results 1 to 10 of 10

Search for date & city and chose checkbox

  1. #1
    Forum Contributor
    Join Date
    02-12-2018
    Location
    Clearwater, FL
    MS-Off Ver
    MS 365
    Posts
    214

    Search for date & city and chose checkbox

    I have a userform that I am trying to setup. I want it to search column "B" for the date that was put in Textbox1 then search range (D8:M8) for the city name then if Checkbox1 ("AM") or Checkbox2 ("PM") in range (D7:M7) and at the intersection I want it to add a 1 to that cell. The numbers need to be a running number so if it do the procedure twice then it would equal 2, if I did the procedure 15 times, the number in that cell would be 15. I'm just starting with VBA again & the following code is what I have so far but no luck. I have attached my book for your assistance & I greatly applicate any help that I would be able to get with this!
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Search for date & city and chose checkbox

    Give this a try - but I was not sure of your desired workflow, so I unload the form after each date/city. I added a named range to store the counter - you can reset it to 1 any time you need, or let it go for as long as you want.
    Attached Files Attached Files
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    02-12-2018
    Location
    Clearwater, FL
    MS-Off Ver
    MS 365
    Posts
    214

    Re: Search for date & city and chose checkbox

    It works like it supposed to but each box should start with zero. Meaning if cell F17 is zero then when I select "Chicago" "1/2/2019" & "AM" it would change to 1. If I select "Boston" "1/1/2019" & "PM" then cell E16 would change to 1. Each cell would count up from zero. I hope that makes sense.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Search for date & city and chose checkbox

    Try this version

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-12-2018
    Location
    Clearwater, FL
    MS-Off Ver
    MS 365
    Posts
    214

    Re: Search for date & city and chose checkbox

    Awesome - thank you so much that works perfectly!!! Is there away I can tie a calendar to this sheet so it corresponds with the values in the cell? Basically have a calendar with a drop down to select the City & it shows the month for that calendar and show large numbers of how many are in that cell?

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Search for date & city and chose checkbox

    I think the easiest way would be to apply a filter to your month column, and then select the month of interest.

    Also, increase the height of Row 8 and delete rows 9 thorugh 15. Then the filtering will look better - in fact, the whole sheet will look better.

  7. #7
    Forum Contributor
    Join Date
    02-12-2018
    Location
    Clearwater, FL
    MS-Off Ver
    MS 365
    Posts
    214

    Re: Search for date & city and chose checkbox

    What I am trying to do is create a master file for myself so I can blackout dates. I am the only one going to be using this workbook. I would like a book that shows a calendar for each location showing how many jobs are available for that location. Is that possible? I have attached a calendar book that I was working on which I have attached but, any help or ideas would be greatly appreciated!
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Search for date & city and chose checkbox

    Try this version:
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    02-12-2018
    Location
    Clearwater, FL
    MS-Off Ver
    MS 365
    Posts
    214

    Re: Search for date & city and chose checkbox

    Thank you so much for your help. However I need a little more assistance! When I click on a block where the AM/PM is located I would like userform 4 to popup which I have done but I would like for the label at the top to populate with the location <br> then the date that was selected. I have uploaded what I have so far! Any assistance would be greatly appreciated. I also have a "database for our customer's info. When I click on the cell I would like for it to show who currently is scheduled for that day weather it be am or pm & have the ability to remove or add the info from userform 4. I have attached my workbook so you can see what I am trying to do.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Search for date & city and chose checkbox

    Sorry - I'm heading out for the weekend soon - you might want to start a new thread.....

+ 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. Return a Metro City after matching a mailing city with a suburb
    By themole in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-18-2018, 10:16 AM
  2. Replies: 1
    Last Post: 01-04-2015, 12:45 PM
  3. [SOLVED] 2 Different Dates but chose the previous date
    By Jarvin24 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-31-2014, 10:51 PM
  4. Replies: 1
    Last Post: 08-12-2014, 01:37 AM
  5. Calculating Shipment Rates Base on Origin City and Destination City
    By Chnatko in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-09-2014, 11:11 AM
  6. How to convert date to number when you chose text
    By hazemrezo in forum Excel General
    Replies: 4
    Last Post: 10-06-2013, 09:26 AM
  7. Calculating City to City -road miles
    By williesmith2008 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-22-2012, 05:19 AM

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