My trip to Maldives…, [travelogue + bonus Excel tip]

Share

Facebook
Twitter
LinkedIn
Note: This is a travelogue style post. There is an Excel tip at the end, but rest of the 2100 words about my experiences of conducting a workshop in Maldives. Feel free to skip this post if you want only Excel stuff.

both-of-us-at-hulhumale-beach

Sometime in November, I got an interesting E-mail from a gentleman named Guru. The title said “Excel Workshop in Maldives”. In the email, Guru introduced himself and asked me if I can come to Maldives to conduct few Excel workshops for companies and individuals.

I usually neglect such mails as many times the actual training (or big consulting assignment etc.) will not happen. So I replied to him giving my number and asked him to call me. I was surprised to receive his call. After talking awhile, it was clear that Guru is tenacious and would not take No for an answer.

So we set things in motion and thanks to Guru’s perseverance, I ended up boarding a flight to Male on 22nd of January. This is a story of what happened next…,

(note: I traveled with my son & Jo. Business trip for me, beach holiday for them.)

The journey (onward):

Almost all the flights to Male from India leave from either Trivandrum, Chennai or Bangalore. We choose the Trivandrum option because it is a direct flight (other 2 flights have a pit-stop at Colombo, Sri-Lanka). The flight took 75 minutes.

Soon after take-off, all we could see was big-blue Indian Ocean beneath us. About 60 minutes in to the journey and small islands and resorts started appearing. They looked nothing like I have ever imagined. The seas were clear blue or green or a mix. The beaches were pure white. The islands looked lush with greenery. The water villas (houses constructed on water) looked calm and elegant.

The same pattern repeated for next 5-10 minutes in various islands before our pilot announced that we would be touching down at Male international airport.

Male Airport

When I saw Male’s map on Google, I thought the airport could not fit anything bigger than an ATR. But I was surprised when we boarded an Airbus 320 at Trivandrum. But I was in for even bigger surprise when we landed at Male. The airport is as big as many other airports I have seen. In fact, they have an entire island for the airport.

So after getting down and finishing immigration formalities we came out.

A note about visas for Maldives:

Maldives has no prior visa requirements for a majority of countries. Almost anyone can go and get a tourist visa for 30 days. Visit Maldives Visa site for more info.

Guru was waiting for us outside airport. We took a ferry to Male, the capital of Maldives. The airport and capital city are well connected by frequent ferries (one every 10 mins). It takes about 15 mins to reach the city.

Male City – Initial Impressions

I have been to some of the most crowded cities in the world – New York, Mumbai, Hong Kong. But I never saw narrower roads than I did in Male. This is probably the first impression you get too. A majority of Maldivians live in Male. Since the city is a small island, they had to get creative to contain so many people and shops and everything. Some of the impressive ways they manage this:

  • Almost all roads are one-ways
  • Many buildings are multistory and quite narrow.
  • Many elevators are small and can carry 6 people at a time.
  • People use bikes or cycles (although you will find a lot of cars, including a BMW that was parked near Sultan Park for the entire duration I was there)

Since I was traveling with family, Guru has arranged accommodation for us in his boss’ house. This was much better than staying in a hotel as my son got more space to play and run.

How my Workshops went?

I had a busy schedule from the moment I landed. On the first day, we conducted a Free Excel Workshop in Aminiya School. This was to get participants to sign-up for our paid workshop.

I choose the topic of Conditional Formatting as it is very close to my heart and the session went very well. We ended up adding few more people to our evening batch.

Later Guru briefed me that I need to conduct 18 hours of Excel training at STELCO (State Electricity Company) and 9 hours at HDC (Hulhumale Development Corp)

We started the training at STELCO next day. We spent the first day discussing Excel overview and writing formulas. The participants were quite friendly and by second day we were cracking jokes and having fun while learning lots of stuff.

Later in the night I conducted a session for individual participants (about 9 of them) again on same topics.

This went for 3 days before we added one more client – FSM (Fuel Supplies Maldives).

What I learned from my workshops?

  • Start with Overview: I always assumed that people would know how to use Excel. So my learning plan started with Formulas (that is how it is for Excel School too). But I was surprised to realize that people want to have a good overview of Excel before jumping in to specifics. So after frist day morning, I changed my plan. My first class became “overview of Excel”. In fact, I even added a lesson Zero to Excel School after coming back.
  • No plan: Before leaving for Maldives, I made elaborate learning plans for both intermediate and advanced Excel sessions. But after landing there, I realized that it is better to have a loosely structured plan and modify it as per participant’s needs.
  • Metaphors are powerful: Often while explaining concepts like namebox, relative vs. absolute references, countif, pivot tables, conditional formatting it was difficult for some participants to understand how they would be relevant. But thankfully, using metaphors I could get my point across
  • Talking for 8 hours a day is a lot of work: After talking for more than 8 hours a day for a week, suddenly I respect all my teachers even more.
  • Pivot tables excite people: In all my classes, when I demoed pivot tables, I could hear “wow!!! that is so much better” from many participants. They raise the overall curiosity of the class and suddenly everyone is paying attention to know more. (hint: expect more pivot table stuff on chandoo.org too)

Participants’ Response:

We had about 50 people attending the workshops. And a majority of them gave a very high rating (4 or 5 out of 5) for it. Many actually wrote testimonials and praised us for doing it. All 3 companies are hopeful to do a follow-up workshop in a few months.

I also learned a lot of things about Excel while explaining or answering students’ questions.

I had a self-doubt whether I would be able to pull off an in-person training program. Now, I am more confident. I can handle future workshops more easily.

So it was a win-win for all of us.

What we did when I was not teaching Excel?

Despite being a small city, Male has lots of surprises. So we were busy for the first 4 days exploring the city and discovering our way back to home. The best things I liked about Male are,

Walks: You can walk from one end of Male to other end in about 30 mins. So you would start from one ocean front and end up another. Although the streets are narrow, they all have foot-paths. So it is easy to walk, leisurely explore the shops and other attractions, watch other tourists and locals.

Ocean Front near Jumhoore Maidhan: is a very lively place to sit and watch tourists, enjoy the sun, ocean breeze, play in the park (or watch your kids play).

(Nishanth and Jo in the sun – Near Jumhoore Maidhan, Male)

nishanth-and-jo-in-sun-at-jumhoore-maidhan

Food: Lots of restaurants serving authentic Asian, continental and Italian varieties. So many varieties of fish and other sea-food at really affordable prices. We especially liked Thai and sea-food at Lemongrass restaurant near Farhadee Magu (close to Sultan Park).

People: Although we did not interact with many people outside my training hours, what I found is that people are very friendly, helpful and cheerful. Participants of my training program are even more awesome as they showed immense curiosity and sense of humor.

About the beaches:

But many people do not go to Maldives to visit Male. They go because of the spectacular beaches in Maldives.

Unfortunately, due to my busy schedule, we could not get much time to explore various beautiful islands in the archipelago. But we did go to two different islands and they both were mind-blowing.

Hulhumale:

(view from Hulhumale jetty)

view-from-hulhumale-jetty

This is an island close to Male. Government of Maldives is developing this island as the mainland Male is very congested. This is where all the new projects are coming up. (and HDC, one of the companies I did training for, is developing the island)

We went to Hulhumale by a ferry on Wednesday (26th of Jan). Hulhumale has lots of beaches (Male has only ocean fronts and one artificial beach). The beaches are very clean, sand is clear white and you can walk almost 200-300 meters in to the water without getting drowned (in some places). We spent the whole evening there.

Six Sense Resort – Lankanfushi Island

(view from a water villa – Six Sense Resort – Lankanfushi Island)

unbelievable-waters-beach-coconut-trees-water-villas-six-sense-resort

A couple of the evening batch students worked at Six Sense Soneva Gili Resort in Lankanfushi Island (one was a training manager and another is a F&B manager). Initially, the training manager tried to arrange a similar workshop at the resort. But they could not make a decision immediately. So we agreed that next time I visit Maldives, I will conduct a workshop at the resort.

But they invited us to spend a day at the resort. Since Maldives is an Islamic country and Friday (and for some companies Saturday) are holidays. So we decided visit the island on Friday (28th). Initially I wanted to say no to the proposal as I was too tired with all the classes. But my wife was keen to enjoy the beaches. So we did go.

Going there proved to be the best part of the trip. The island and the beaches there are nothing like I have ever seen. The waters, sun, sky and calm resort instantly rejuvenated me. We spent the whole afternoon at the beach. I even swam for a while.

We had some coffee and snacks the restaurant. My son started crying loudly when the restaurant supervisor, a Japanese lady, said hello to him.

(3 of us at the staff canteen – Six Sense resort)

all-of-us-at-six-sense-resort-employee-canteen

We left the place barely in time to catch the ferry back to Male.

Are you planning to Visit Maldives? A short tourist guide:

When to go?
November to March is a really good time to visit Maldives. It is very sunny and hot through out the year here. So you may want to avoid the summer months (April-June) or Monsoons (July-October).

What to take?
Beach-wear of course. They have showers in Airport too!!! Carry sun-glasses, hats, slippers, cotton clothes.

About Visas:
For a majority of countries, You do not require visa to enter Maldives. You can get a tourist visa for 30 days upon arrival. Visit Maldives Visa information site.

How much it costs to visit Maldives?

Maldivian currency is Rufiya (MVR). You can get 12.75 MVR for each US $.

Almost all the items are imported to Maldives from near-by countries. For this reason, many food items etc are expensive. That said, compared to costs in many developed countries, Maldives is cheap. You can have a really good meal (with sea-food etc.) for about $10.

Some hacks for budget travelers:

  • For breakfast, go to Seahouse at the Hulhumale Ferry Terminal. They have breakfast buffet for 65 MVR on all days. You can find all varieties (English, Continental, US, Asian) of breakfast items, juices etc. The best part is, you can watch the ocean, speedboats, soak in sun while enjoying the food for a couple of hours.
  • Do not buy milk: It is very expensive here. Instead, you can buy Milk powder and use it for coffee / tea. You can also get yogurt.
  • Take a cab: Taxis are un-metered in Male. You can go from anywhere to anywhere by paying just 20MVR. So if you are tired, hail a cab.
  • Eat out: There are tons of places through of Male that are cheap and delicious. You can walk in to almost any restaurant and eat food for less than $20.
  • No shopping: Since almost everything are imported, you will find the prices to be on higher side for usual shopping items like consumer electronics, clothes, shoes or cosmetics. I was told TVs are cheaper, but carrying one to back home would be a pain.

Closing Thoughts:

We really enjoyed our brief stay at Maldives. I am thankful to Guru and IIPD (the organization Guru works for) for everything they have done to make the training workshops a great success.

Special thanks to STELCO, HDC and FSM for trusting me and giving their time & attention.

I was left with a few hundred Rufiyah by the time we returned to Airport. But I did not give them back to Guru as I know that I would be visiting Male once again. But next time, I hope I could spend a few more hours by the beach too.

Bonus Excel Tip for those of you making this far:

I know you read the travelogue because you want to know more about me. I find it very humbling. So here is a small Excel tip 🙂

Use NETWORKDAYS.INTL() to calculate working days between 2 days with custom weekends:

Often, you may want to find out number of working days between 2 dates. We can use NETWORKDAYS() formula to do this. For eg. NETWORKDAYS(“1-JAN-2011″,”31-JAN-2011”) would tell you the number of working days in Jan (assuming Saturday and Sunday are weekend holidays).

But what if you live in countries like Maldives, where Friday is the weekend. Well, thankfully, you can use the NETWORKDAYS.INTL() formula. This is a new formula introduced in Excel 2010.

So =NETWORKDAYS.INTL(“1-JAN-2011″,”31-JAN-2011”,16) will give you the number of working days in Jan 2011 assuming Friday is a weekend holiday.

But what if you don’t have Excel 2010?

Well, you can use networkingdays() custom UDF instead.

More Travelogues:

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

113 Responses to “Advanced Data Validation Techniques in Excel [spreadcheats]”

  1. Jorge Camoes says:

    Let me add that usually you should have those lists in a "control" or "support" sheet, creating a named range for each list. Then you could enter: If($B$7="Full List", range1, range2). Just a bit cleaner.

  2. Chandoo says:

    @Jorge: You are right... using a control sheet is always advisable.

    • AFP says:

      =OFFSET(C9,MATCH($B$6,$B$10:$B$22,0),0,COUNTIF(B10:B22,$B$6),1)

      OFFSET(reference, rows, cols, [height], [width])

      Hello everybody,

      I am trying to use the OFFSET proposed formula =OFFSET(C9,MATCH($B$6,$B$10:$B$22,0),0,COUNTIF(B10:B22,$B$6),1) but doing "reference" from a another sheet in the same woorkbook.

      Can you confirm that the OFFSET accept a "reference" from another sheet in the same workbook, e.g. sheet2!C9...

      Thank you in advance for your feedback.

      • Hui... says:

        @AFP
        Yes, That can be done and your format is correct
        =OFFSET(Sheet2!C9,MATCH($B$6,$B$10:$B$22,0),0,COUNTIF(B10:B22,$B$6),1)

        Just remember that if there are multiple values of the cell B6 in the range B10:B22 that you will get a #Value! error
        That occurs as you are trying to return a Range which will be the No of occurrences of B6 in the Range B10:B22 long
        If you want just the cell at the offset, use:
        =OFFSET(Sheet2!C9,MATCH($B$6,$B$10:$B$22,0),0,1,1)

        If you want to sum up that many cells use
        =Sum(OFFSET(Sheet2!C9,MATCH($B$6,$B$10:$B$22,0),0,COUNTIF(B10:B22,$B$6),1))

        • Animesh says:

          any suggestion on-
          (1)how to make this data range dynamic
          (2)Data Validation will be on a separate sheet
          (3)Whatever data updated on the data range, the same will be automatically update in Data Validation list in separate sheet.

      • George says:

        yes is does

  3. Ketan says:

    @ Jorge & Chandoo == Thanx for nice idea. Without naming the range, control/list from other sheet does not work.

  4. Ketan says:

    @ Jorge & Chandoo == Ref. Problem#2
    If you make databse in following order of Area, it won't work :
    Marketing
    Ops
    Marketing
    Sales
    Sales
    Marketing

    i.e. all the similar areas are to have one after other OR need to sort on area.

    Your comment pls !

    • Greg says:

      Yes I notice that if col A is not sorted and select project dropdown list values will be incorrect for any unsorted selection from Col A. Is there any way to sort this using formula first. I am trying to stay away from using vba

  5. Lincoln says:

    @Ketan

    That's why it says in the solution that "the list is sorted on column B".

  6. Chandoo says:

    @Lincoln: thanks...

    @Ketan: you are right The list needs to be sorted as I have noted in the article.

    There are some solutions involving array formulas (shudder) etc. to overcome this, but I always try to keep these things simple so that anyone can understand and use. As such I am no good at array formulas myself and don't venture in to them unless they are the only option.

  7. Cheryl says:

    Since we are on the topic of named ranges (well sort of) can someone tell me an easy way to rename a named range? I have a report where it would be really helpful to use a named range in my vlookup but the range varies month to month..
    And since it's Thanksgiving, I wanted to say thanks to you Chandoo because people think I spend hours & hours researching how to do things when really most of my information comes from right here!! 🙂

  8. azmat says:

    I have a question....may b m asking for too much....can it work like we have on web pages...i wud illustrate it wid an example as to what actualy am lukin for....

    suppose when we select deptt "Ops" then it should remove the value currently present in project value instantly.......(if it's not of "Ops" deptt)

  9. Chandoo says:

    @Cheryl... thank you. did you try using indirect or offset functions in the named range definition. That way even though the names stays same, you can change the range it refers to by simply changing value in a control cell. Let me know if you have trouble in doing this. I can elaborate on this.

    @Azmat: hmm.. resetting value on previous selection... I guess you can use VBA to get this effect. But you wouldnt probably want to use vba. I dont know other ways around this. Does any one know how to reset a data validation enabled field when some other cell changes?

  10. Cheryl says:

    I have not, but I know you did have a posting about those recently. I will check that out! Thank you.

  11. Karthik says:

    Have a simpler version of this solutions.
    1. Define a name range with name as "Department" and list containing “Marketing, Ops, Sales, IT”
    For Ex: In D1 put the title as Department, D2 as Marketing, D3 as Ops and so on
    2. For each of the projects define a named range with the department names.
    E1 will have the title Manufacturing, E2 has project 1,project2 ...
    3. In Cell A1 use data >> Validation >> source = Department
    4. In Cell B2 just use data >> Validation >> source =INDIRECT(A1)

  12. Asif says:

    Hey in all the above examples the 'list' is in the same Excel file. What will I do if my 'list' is another Excel file?

    • Taha says:

      Hey there Asif,
      Name your list first and then in validation box type the name of your list. Let's assume you name your list as LIST. So in validation box type as =LIST and it will work. Please reply with your reslut.
      Thanks...Taha

  13. [...] Check out Chandoo’s blog - Pointy Haired Dilbert - article ‘Advanced Data Validation’ [...]

  14. Darwin de Leon says:

    Why is it that if you extend the Range ($B$10:$B$22) to for example ($B$10:$B$33) it gives you wrong output?

  15. Chandoo says:

    @Darwin .. Are you sure you have edited the range in all places?

  16. Darwin de Leon says:

    I used your sample Excel file to test the data and extend the rows up to B33, then in Data Validation>Source I try to change the formula to this: =OFFSET(C9,MATCH($B$6,$B$10:$B$33,0),0,COUNTIF(B10:B33,$B$6),1)

    If I select Marketing, the resulting list includes Projects under Ops Area.

  17. Darwin de Leon says:

    I sent you an email with your sample data and additional rows in your gmail.

  18. Chandoo says:

    @Darwin... Did you sort the list by department name? It seems to work fine for me.

  19. Darwin de Leon says:

    Got it! I should have paid attention to the comments here. Thanks!

  20. Adnan Rafiq says:

    Can anybody tell me about calender of date option in data validation, when I wish to put any date then calender should appear on screen.

    Your reply will be highly appreciated.

    thanks and and regards,
    Adnan

  21. Chandoo says:

    @Adnan... I think you have to use a bit of VBA to show calendar control to let user enter valid dates.

  22. Amien says:

    I've got a few columns of data where the next column need to refer to the previous as data vaildation eg. District, Area, Area Manager, Project No. etc. if i choose a district (North) it brings up only the Areas for North but how can I go beyond that so that in a next cell I can select the Area Manager for that Area & the Project numbers for that Area

  23. Venkatesh says:

    Dear Chandoo,

    Am a Silent reader of your posts and this blog..Its quite interesting and very useful for me..
    In the above post, using Indirect(Cell reference) also works very well...The referenced cell may contain any one of the Name..

    Venkat

  24. Hui... says:

    @Adnan
    There are several examples and free pop up calendars
    a quick search of Google will find references to both
    http://www.google.com.au/search?hl=en&safe=off&q=popup+calendar+in+excel&btnG=Search&meta=&aq=f&oq=

  25. Venkatesh says:

    Amein, the same can be done with the use of Name Manager and INDIRECT function...

  26. Jon says:

    This is excellent - really helped me out. However, still a little stuck I'm afraid. I have 7 lists in total, each needs to feed off the preceeding list. Can you give me some guidance on what I need to have in the data validation cells from list 3 - 7 so it includes all of the previous entries?

    Additionally, there is some overlap in each list (i.e. I have one list titled Region, where Global is seen in more than one of the preceeding categories). Right now, when I click the drop down list I get multiple Global's rather than just one.

    Any thoughts? I've been working on this for ages now so any help you can give would be great!

  27. Francis says:

    Chandoo,

    What if I have problem 1 in problem 2 above?

    To explain, If my list under marketing is too big and I only want to see only the items that are frequently used instead of all available items, how should I amend my formula?

    Help please!!!

  28. john says:

    The data has to be in the same worksheet i believe? usually a separate worksheet is used for reference. could you clarify how do you go about it? It doesnt work if you reference the data from a different sheet. the control page or something mentioned is not clear to me.

  29. ahmet says:

    Hi Chandoo,

    I am not too sure if i can use data validation with the problem that i have.

    I have a data enry of around 5000 rows in 1 sheet and i want to be able to select a person randomly after applying auto filters.

    i am not sure if this is possible.

    say for example, i want to select a name randomly which is in coumn D after filtering using other columns which shows me who is attended a specific course, meeting etc.

    your help would be much appreciated.

    Thanks

    Ahmet

  30. Chaluva says:

    Hi,
    Please help in creating Data Validation which accepts only text.

    Please Note: It should not accept text and number combination.

    Thanks
    Swamy

  31. Ananthanarayanan says:

    I have created a file with data validation. In a column there are over 75 entries in a drop down data. One has to scroll through the list to select an entry.
    Is there a way by which just by entering the 1st letter or the 1st two letter, the drop down list shownall the data with these starting letters so that the selection becomes easier.
    My thanks in advance for this guidance.

  32. Hui... says:

    @Ananthanarayanan
    Excel doesn't have an Auto Complete facility in Data Validation.
    But with a bit of careful planning you can achieve the same result.
    Read how here:
    http://www.ozgrid.com/Excel/autocomplete-validation.htm

  33. jagmohan says:

    Question:

    If the lists are as follows what is the expected list in first dropdown?

    B C
    a aa
    a ab
    a ac
    a ad
    b ba
    b bb
    c ca
    c cb
    c cc
    c cd
    c ce
    d da
    d db
    d dc

    What I get in first dropdown is {a, a, a, a, b, b, c, c, c, c, c, d, d, d}. How to reduce it down to only {a, b, c, d}

    regards,

    Jagmohan

  34. Hui... says:

    @Jagmohan
    Have a look at some techniques here
    http://chandoo.org/wp/2010/02/02/data-validation-using-an-unsorted-column-with-duplicate-entries-as-a-source-list/
    .
    http://chandoo.org/wp/tag/unique-items/
    .
    or use an Advanced Filter
    .
    All of these techniques can be automated if required.

  35. jagmohan says:

    Hi Hui,

    Thanks. I tried to use the Pivot table technique and it worked. Further question on the same.

    Now I add few items in column H and column I (sorted again) - as follows

    Excel Information
    The lists are in Column H and I starting from row 4. F9 contains the first drop down. G9 contains the second dropdown. Pivot is located in Column M starting from row 13.

    H I
    a aa
    a ab
    a ac
    a ad
    b ba
    b bb
    c ca
    c cb
    c cc
    c cd
    c ce
    d da <- New item
    d db <- New item
    d dc <- New item

    Now is it that I need to delete the pivot table, create a new one and then use it? Or is there any technique by which I can dynamically grow the pivot table?

    Ofcourse I changed the formula in G9 to following
    offset(I4, match($F$9, offset($H:$H,0,0,counta($H:$H)-1,1),0), 0, countif(offset($H:$H,0,0,counta($H:$H)-1,1),$F$9), 1)

  36. Hui... says:

    @Jagmohan

    If the pivot table is based on a Dynamic Range, then refreshing the pivot table will add the extra items.

  37. jagmohan says:

    Now how do I check that?

  38. Hui... says:

    @Jagmohan
    Dynamic Ranges expand/defalte as the data in the range increases or is deleted
    They are added using Named Formula
    refer: http://chandoo.org/wp/2009/10/15/dynamic-chart-data-series/
    Once you setup a Named Formula for your range, change the pivot table to be based on that range
    As you add or remove data and update the pivot table it will adjust for the new data scenario

  39. vamique says:

    how do i do the same if there are more than 2 columns for eg , country, state, city.

  40. Bruce says:

    I want to be able to use data validation where the restricted input would be either a number greater than 0 or the text "na". I tried using an OR statement, but it didn't work. Not sure if I just had bad syntax or if I can't do it that way. Any help would be appreciated.

  41. baum schausberger says:

    how to generate a list of non-repeating combinations, with some values sums off, and some values on, beside show how many evens and odds numbers.

  42. Tanvir Khan says:

    Thanks Chandoo, it's really very helfull formula. But the formula doesn't work if we copy and paste in the other rows and we can correct by taking out $ from $B$6. So the correct formula should be

    =OFFSET(C9,MATCH($B6,$B$10:$B$22,0),0,COUNTIF(B10:B22,$B6),1)

  43. Dan says:

    Here is my scenario I'm trying to find a solution to - any input would be greatly appreciated!

    Lets say apples oranges and pears have cost codes associated with them:

    Apples - 123456
    Oranges - 789123
    Pears - 567890

    Is there a way to see the text "Apples" in the dropdown, then once you select it the cost code "123456" would populate and not the Apples text?

  44. Denz says:

    In the 'Data Validation - Change Lists' - What if I have multiple 'Select Area' and 'Select Project'? How to apply the formula in each and every cell in the column with same data list? Your speadsheet shown only one cell of 'Select Area' and one cell of 'Select Project'.

    Thank you very much.

    Denz

  45. [...] Cascading Drop downs – load values in 2nd list depending first list [...]

  46. ashl says:

    Hi,

    I've tried this formula but my list is in another tab in my workbook and because of this i keep getting the message that  I can't reference validation lists to other tables or worksheets. Ive tried naming my range but this isn't working either. Please help 🙂

  47. Faisal says:

    I have too many columns and i want to prevent duplication. for example
    col 1    col2   col3 col4 ...................
    xyz      123   aaa  bbb   ccc
    xyz      132   ccc   aaa   bbb
    abc      234   aaa  ccc     ddd
    abc      324   ccc    aaa   bbb

    now i want to prevent this entry
    xyz   123  .............
    or
    abc   234  .............

    plz help
     

    • Derek says:

      I just used pivot tables to extract the data. it will remove the duplicates. Then reference the pivot table for your drop down?

  48. Satyam Garg says:

    Hi,
    I wanted to create dependent lists. For example:
    Col A Col B Col C
    ------ ------ ------
    TaskA BAU Z101
    TaskA PRJ Z002
    TaskA PRJ Z003
    TaskB BAU Y403
    TaskB BAU Y407
    TaskB BAU Y412

    I need to find out what formula should I put in my data validation in Col B so that when TaskA is selected, I will only see "BAU" and "PRJ" in the dropdown list and "PRJ" should come only once. When TaskB is selected, I will only see "BAU" once. Presently with your solution I can only get to the stage where BAU will appear 3 times, if TaskB is selected.

    Thank you so much in advance for your help.

  49. Pavel says:

    Hi,
    I would like to ask if is possible to swith off Scrolling bar in pop up tab :
    I got values for example
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
    and only 8 are visible in pop up window. I would like to disable this and have biger tab offering me all 10 (I am aware if bigger list i might have difficulties to pick one I need.
     
    Many thanks
     
    Pavel
     

  50. Mike says:

    Hi,
    Problem 1 didn't work as explained.
    The data validation list only shows the false statement part and didn't even the have Full List word showing on the List down menu.  Any advise???
    Thanks.
    Mike.

  51. Megan says:

    I am looking for a formula so that an error message is returned when incorrect data is entered into the cell.
    If the adjacent cell on the left contains the data CY+3 (or any other number)or the data IND+0 then this particular cell CAN NOT contain the data EVT (or EVT+ any number) and an error message should be returned. I then wish to copy this down the column.
    Please help! I am pretty sure this is possible. I used to be a wizz with excel formulas but I haven't used them for almost 10 years now!
    Thanks.

  52. Pedro says:

    Hi C
    sometimes the forum looks like a wishing list 😉
    why not to add more to it...
    Change list values based on what is selected in another list?

    could you elaborate more in the case of a 3rd or a 4th list how the offset should look like, e.g..:
    List 1
    Men
    Women
    List2
    Blue
    Pink

    List3
    XL Men
    L Men
    L Women
    M Women

    so, ig I pick Men from one data list I will get from list 2 Blue and for list3 XL Men & L Men,
    what will be the best way to do it?
    =manythanks
    P

  53. Sumit says:

    Chandoo.. This is an amazing trick.. thanks a ton 🙂

  54. Ollie Wood says:

    Hi
    I am using the second formula using offset and match and it works fine when the list is sorted. My list is sorted but there may be instances when it is not. This formula doesn't then return the correct values. Do you have any ideas how to get around this?

  55. Kristian says:

    In the second problem, how do one allow for the user to enter data freely in the project list?
    E.g. in my sheet the user can first choose between the areas "marketing", "sales", "ops" or "others". If the user selects one of the first three he will get a new list to choose from in the "select project cell", but if the user selects "other" he should be able to type in whatever he wants in that cell.

  56. Tom says:

    HI,
    When dealing with PROBLEM 1 i have another Problem using Data Validation. The Solution works perfekt, but activating "Circle Invalid Data" leads to the following problem:

    In SITUATION1, when selecting a value of the "Partial-list-range" the data is not recognized as invalid data. But selecting "FullList" (SITUATION2) and then a value of the "Full-list-range" the cell is circled and marked with a Data Validation Error. Saying "Restriction: Value must match one of the listed items".

    I have googled my a** of to find anything about this problem or a workaround or sth., but without succes. I was not able to teach excel that a value of either the one or the other list is valid.
    Can anybody help me with this issue?

  57. Abhinandan says:

    Hello everyone,
    Is it possible to limit the data range depending upon value selected in drop down list.

    Suppose i have a drop down list (say in cell M1)which has 5 options, namely Refrigerator, TV, Mixer, Micro oven, Speaker.
    Now i want to limit the data entered in cell X20 depending upon the option selected.
    For example:
    For TV maximum value allowed to be entered in cell X20 = 1000$, For refrigerator 800 $ and so on....
    Is it possible to do in excel 2010? If it is possible, tell me how to do it.
    Thanks & Regards

  58. Abhinandan says:

    Thanks a ton sir.
    It's really working.
    But there is a problem. I can still Copy paste the data above the maximum limit. Let say for TV maximum limit is 800. In some other cell (which is not Protected) i wrote 1000. Now i copied that 1000 and paste it into the validated cell. And it is showing 1000 as input.
    Can you tell me how to protect it from copy paste option?

    Thanks & Regards
    Abhi

  59. Derek says:

    So,
    I have used this validation:
    =OFFSET($T$9,MATCH($C$11,$S$10:$S$34,0),0,COUNTIF($S$10:$S$34,$C$11),1)
    I want to copy this into about 300 more cells, but I need the values for C11 to change to each subsequent cell. (C12, C13, etc)
    I have tried making Fields instead of point to a specific cell, but this brings me errors. Is there a fast way to copy the "equation" while changing cells to fit reference cells per row? Right now, I am manually changing all of them. Way too much time for what I am doing.
    Thanks.

    • Hui... says:

      @Derek
      Remove the $ from the C11
      =OFFSET($T$9,MATCH($C11,$S$10:$S$34,0),0,COUNTIF($S$10:$S$34,$C11),1)

      The $ locks that component of the cell reference and hence it doesn't change as you copy the formula

  60. Hui says:

    Thank you sir. I will give it a try. Will let you know. I LOVE this site! You guys have a ton of great info.

  61. Derek says:

    Thanks so much! It worked. You guys at Chandoo.org are the very best! I look forward to learning more!

  62. Derek says:

    Thanks so much! It worked. You guys are the very best! I look forward to learning more!

  63. Reinard says:

    How do i get cell D6 in Sheet"Data Validation - Change Lists" to revert back to blank if the selection in cell B6 has changed?

  64. Eira says:

    I would like to validate if cell d7 contains "C" or "F". In case "C", cell G7 can get a value, but in case of "F", cell G7 should be locked, or a error message shoudl pop up. can this be done with data validation?

  65. Dave says:

    Hi,

    I would like to create a ONE to MANY drop down list.

    E.g. I have a sheet with the first drop down as COUNTRY, after selecting country I would like multiple other lists to be dependant on this first selection, so BLOCK or CONTRACT lists should refer to the selection in COUNTRY and then the options reflect the chosen COUNTRY, is this possible?

    I can create 1 dependant list using the INDIRECT formula without problem but I cannot get any additional lists created that are dependent on the first selection due to not being able to define the names in the same way, i.e. select UK as country then the next list is defined by UK but I cannot create a third due to not being able to name another list as 'UK'.

    Please can you help me out with this. (Hopefully what I have written makes sense and is clear enough...)

    Many thanks,
    Dave

  66. Anthony says:

    Hi,

    I’m used your formula for a data validation.

    I’ve just adjusted the range’s of data to reflect my lists, however it seems out of sync by 1. Instead of the dropdown returning E6:E10, it returns E7:E11.

    Thanks in advance for your help… any suggestions at all?

    =OFFSET(‘Branch List’!$E$1,MATCH($B$3,’Branch List’!H:H,0),0,COUNTIF(‘Branch List’!$H:$H,$B$3),1)

  67. shabber says:

    Super Chandoo!!

  68. Santosh says:

    Dear Chandoo,

    I have list which i want to use in data validation. However the same is quite long, about 200 lines - each line is different value. Now while using data validation, i want to display only those name which match the criteria i put in the cell

    for e.g.

    My list is as follows :

    PUNE
    Chembur
    Maninagar
    KONDWA KHURD , (PUNE)
    MAJURA NONDH(SURAT)
    BIBWEWADI (PUNE)

    if i type PUN, the list should show only following
    PUNE
    KONDWA KHURD , (PUNE)
    BIBWEWADI (PUNE)

    Please let know any method

  69. Fiona says:

    At work recently I changed some information in 2 cells that I had filtered and it changed all the cells in between too. How can I avoid this happening again ?

  70. Chielaks says:

    please help me how to make it automatically appear in the other sheet. ahmmm ill change " this determines what is loaded here " to "This determines what is going to appear here". thanks!

  71. Kunal Bhardwaj says:

    Hi

    I am trying to prepare a macro for an excel sheet. I need to know how can i change the data in various cells on changing the selection from a drop down list.

  72. DMurray3 says:

    Hi...

    I am trying your worksheet example, applying Table Nomenclature.

    I copied your validation cels (B6...C7) to B30:C31; the data table from B9:C22 to B34:C47 =(Table1, fields: [Area] and
    [Project]).

    The offset function is =OFFSET($C$34;MATCH($B$31;Table1[[Area]:[Area]];0);0;COUNTIF(Table1[Area];$B$31);1)

    The formula works out fine when reviewed (in Edit Mode, a "F9" over the entire formula). But when the same is pasted to the data validation, excel compains there is a mistake in the writing of the formula and does not allow it.

    May I suggest that in your example worksheets, you also provide examples using "Table Nomenclature.."

    Can you help..!!

    Many thanks... and kind regards

  73. Phillip says:

    I know that Excel does not allow auto completion in a data validation cell. There are several workarounds, but I cannot seem to get them to work. Does anyone have any simple suggestions.

    Thanks.

  74. Chloe says:

    Hi,

    I am using offset+match+countif in my validation list and I am able to get the correct range of list.

    However, even tough I have checked the error alert box in the data validation, there is no error message prompt out if I manually input wrong description. I wish there is error message prompt out if I input invalid data, does anyone have any suggestion?

    Thx.

  75. Kevin says:

    Hi
    I have a spreadsheet that is updated very frequently. At any point in time I will need to print out data that has been collected today (=Today() ). Once printed, only fresh data with Today's date will be printed and not any previous data.

    Any help would be appreciated.

    Kevin

  76. galabuon says:

    Thx , this is what i looking for.

  77. Irina says:

    I was trying to do Problem 2 - "You would like to change a list’s values based on what is selected in another list"

    My problem is I can't create the drop down in the second column (the projects, in column D). The formula only works if I enter it in the cell, but then I get the full list, not a drop down.

    Here is what I mean - go to Test tab

    https://docs.google.com/spreadsheets/d/1UJB3aTCUTdI3Ckewa0rfK43wSsNkogzZBctX-VS6Q7o/edit?usp=sharing

    Thank you for your help,
    Irina

  78. Durga Snaker says:

    My Macro is not working
    Ans = 0
    Function da(basic)
    If MTH >= 1 Then
    da = basic * 0.05
    ElseIf MTH >= 5 Then
    da = basic * 0.1
    Else
    da = 0
    End If
    da = Application.Round(da, 2)
    End Function

  79. Claire Conlaund says:

    I have a spreadsheet that works on a value entered in one box then generates a unit number in another so e.g. No of units = 10 it gives you 10 cells underneath labels U1-U10 under these are drop downs that give you option of small - large per unit of which then the selection returns a value of pages 30-90 to allow us to cost the units, The problem I have is that if you select 10 units max select the small - large drop downs it works fine but if you then change the 10 to 5 units the units headers disappear but the drop down list below remains and stays stuck on the previous selection so still brings in a page number and therefore a calculation of costs. Is there a way to refresh and remove the drop down when the header above is not there. The drop down is dependent on the unit header been above.

    Thanks

  80. Raghuram JC says:

    I am using a list box (form controls) which is for listing the months. Is there any way I can make the list dynamic ie., for July, the list will show Apr. to Jul. Next month, it will Apr. to Aug. so on.
    Alternately, pl. suggest the way forward in Data validation.
    Regards

  81. Dipak Khalasi says:

    Dear sir,
    I have two queries.
    1. I have applied data validation rule to a range of cells to accept only decimals between 0 to 30. It works well, but it accepts other values when copied and pasted to that range. So, how do I restrict copy-paste on those cells?
    2. i stored marks of students out of 50. Data validation check is applied to restrict user from entering wrong values too. but now it does not allow me to place "ABSENT" to some cells. So, How to add multiple checks to data validation?

    Please reply at your earliest...
    Thanks in advance.
    Dipak

    • Kelvin says:

      hi there,

      i would like to limit the entry for drop down list. Example.
      I have 4 names in the list drop down. the moment i choose more than 2 times the same name it should show me an error and not allow me to choose the same name.

      Can i know how to go about it.

      thanks

  82. radiostar says:

    Dear Chandoo, thank you as always. This article inspired me to combine the switch and change lists. Here it is if you want to take a look:
    http://www.filedropper.com/showdownload.php/advanceddatavalidationtechniques

    P.S.: The file attached is perfectly safe. 🙂

  83. Gagan says:

    I have 2 validation drop down list. Second validaion drop down list is based on first one.

    Validation is working fine for me. My question is if I change select any value from first drop down, in second i get the correct list, but I get selected value from previously selected option.
    Example: If I have firstname and lastnames in first drop down list, if i select my name "Gagan" from first list then i get "Chawla" from second list which is correct, but if I change first one to any other name, I see "Chawla" already in cell how to change this? So that i someone forgets to change dependent list, it should be blank?

    Thanks
    Gagan

  84. abhijeet says:

    Hi

    In Data Validation Cells how to protect from Copy Paste means Same Like Combo Box not allow copy paste same like in data validation cells please tell me how to do this

  85. Ufoo says:

    Hello gurus, I have struggled to avoid using OFFSET function in the drop down list. I have made this formula to determine the range to use, but the formula is not being accepted in data validation. Please help. Thanks: =INDEX($C$10:$C$22,MATCH(B6,B10:B22,0)):INDEX(C10:C22,MATCH(2,1/(B10:B22=B6)))

  86. Susan VanVolkenburgh says:

    First of all I love your emails and all of your tips. When using a formula as the source for a list in Data Validation and it is longer that the text box, is there any easy to edit any portions that are beyond the edge of the text box. I can place the cursor at the far right and then press the right arrow key but it always adds a cell reference that I then have to take out. I can they make my changes. Is there a better way?

  87. Akram says:

    Hello,
    I have the 1st file that list the employee names, their designations and their departments. In the same file under Name Manager they are saved as per departments (Name Tele refers to =test!$B$13:$B$25) (Sales refers to =test!$B$27:$B$43) and so on for the other departments.

    In the 2nd file (attendance) I need to add;
    1. Drop down list that will have all the Departments (sales, tele, backoffice) from the 1st file
    2. This drop down list should pick names only from the 1st drop down list (ie employees from their respective departments from the 1st file)

    Pls advice.

    Thanks & best regards

  88. Priya says:

    I have put validation in my spreadsheet. I want to get an update on my mail, when ever that validation value will change. How to do it.

  89. Shekhar says:

    I really loved your directions. And it would be really helpful if I get directions to get over this consequential issue. Please guide!

    In Solution 1:
    The formula does the job of auto selecting from the drop down list based on its "if" conditions. But once we manually select an item from drop down list, then onwards the formula stops running.
    Can we retain the formula even after we've manually selected from the drop down liwt? If so, please help.
    Thanks a tonne!

  90. zoey79 says:

    Name your list first and then in validation box type the name of your list. Let's assume you name your list as LIST. So in validation box type as =LIST and it will work. Please reply with your reslut.
    Thanks...

Leave a Reply