Hi there.
I have a workbook which has a worksheet for every day in the month. On each worksheet there is a table which groups, say, cities together according to the country they are in, and each city will have a 1 or a 0 in the right-hand column to determine if that city was covered that day. This table remains in the same position on each worksheet. Every day one city from each country must be covered. A '1' in the right hand column means that the city was covered that day and a '0' means that it wasn't covered. Every day, this has to be alternated. So if the below table was for the 1st of April...
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]NEW YORK[/TD]
[TD]USA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LOS ANGELES[/TD]
[TD]USA[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]TEXAS[/TD]
[TD]USA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LONDON[/TD]
[TD]ENGLAND[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BIRMINGHAM[/TD]
[TD]ENGLAND[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LIVERPOOL[/TD]
[TD]ENGLAND[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]SYDNEY[/TD]
[TD]AUSTRALIA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BRISBANE[/TD]
[TD]AUSTRALIA[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]TOKYO[/TD]
[TD]JAPAN[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]NAGASAKI[/TD]
[TD]JAPAN[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]PARIS[/TD]
[TD]FRANCE[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LYONS[/TD]
[TD]FRANCE[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]MARSEILLES[/TD]
[TD]FRANCE[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]GENEVA[/TD]
[TD]SWITZERLAND[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]MUNICH[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BERLIN[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]HAMBURG[/TD]
[TD]GERMANY[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]FRANKFURT[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BREMEN[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
Then on the 2nd of April, the city which is covered will be the next city down on the list for that country, like so...
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]NEW YORK[/TD]
[TD]USA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LOS ANGELES[/TD]
[TD]USA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]TEXAS[/TD]
[TD]USA[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]LONDON[/TD]
[TD]ENGLAND[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BIRMINGHAM[/TD]
[TD]ENGLAND[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]LIVERPOOL[/TD]
[TD]ENGLAND[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]SYDNEY[/TD]
[TD]AUSTRALIA[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BRISBANE[/TD]
[TD]AUSTRALIA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]TOKYO[/TD]
[TD]JAPAN[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]NAGASAKI[/TD]
[TD]JAPAN[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]PARIS[/TD]
[TD]FRANCE[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]LYONS[/TD]
[TD]FRANCE[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]MARSEILLES[/TD]
[TD]FRANCE[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]GENEVA[/TD]
[TD]SWITZERLAND[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]MUNICH[/TD]
[TD]GERM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[TR]
[TD]MUNICH[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BERLIN[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]HAMBURG[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]FRANKFURT[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BREMEN[/TD]
[TD]GERMANY[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
...and so on.
The far right column (the 1's and 0's column) is a COUNTIF reading if a given range contains the city. The cells in this range are currently populated manually. The order of the country cell will change from day to day. One example is below (for April 3rd shown above), though the order of the countries/cities will change each day.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]USA[/TD]
[TD]NEW YORK[/TD]
[/TR]
[TR]
[TD]SWITZERLAND[/TD]
[TD]GENEVA[/TD]
[/TR]
[TR]
[TD]GERMANY[/TD]
[TD]BREMEN[/TD]
[/TR]
[TR]
[TD]FRANCE[/TD]
[TD]LYONS[/TD]
[/TR]
[TR]
[TD]ENGLAND[/TD]
[TD]LIVERPOOL[/TD]
[/TR]
[TR]
[TD]AUSTRALIA[/TD]
[TD]BRISBANE[/TD]
[/TR]
[TR]
[TD]JAPAN[/TD]
[TD]TOKYO[/TD]
[/TR]
</tbody>[/TABLE]
I want to know if there is a way to automatically write the city to the appropriate cell (i.e. adjacent to the country the city is in) for each day of the month, according to the selection rules described earlier in this post (rather than eyeballing the table on the day previously to figure out which is the next city to cover). Please note that each country cell will continue to be populated manually. So for the above example, if I enter 'ENGLAND' into cell A1 I want cell B1 to automatically write 'LIVERPOOL'. The next day, when I enter 'ENGLAND' into, say, A3 I want B3 to show 'LONDON' as this is the next city in the list to be covered.
Sorry if this is convoluted. I tried to edit this to make sense, honest!
I have a workbook which has a worksheet for every day in the month. On each worksheet there is a table which groups, say, cities together according to the country they are in, and each city will have a 1 or a 0 in the right-hand column to determine if that city was covered that day. This table remains in the same position on each worksheet. Every day one city from each country must be covered. A '1' in the right hand column means that the city was covered that day and a '0' means that it wasn't covered. Every day, this has to be alternated. So if the below table was for the 1st of April...
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]NEW YORK[/TD]
[TD]USA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LOS ANGELES[/TD]
[TD]USA[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]TEXAS[/TD]
[TD]USA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LONDON[/TD]
[TD]ENGLAND[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BIRMINGHAM[/TD]
[TD]ENGLAND[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LIVERPOOL[/TD]
[TD]ENGLAND[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]SYDNEY[/TD]
[TD]AUSTRALIA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BRISBANE[/TD]
[TD]AUSTRALIA[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]TOKYO[/TD]
[TD]JAPAN[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]NAGASAKI[/TD]
[TD]JAPAN[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]PARIS[/TD]
[TD]FRANCE[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LYONS[/TD]
[TD]FRANCE[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]MARSEILLES[/TD]
[TD]FRANCE[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]GENEVA[/TD]
[TD]SWITZERLAND[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]MUNICH[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BERLIN[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]HAMBURG[/TD]
[TD]GERMANY[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]FRANKFURT[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BREMEN[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
Then on the 2nd of April, the city which is covered will be the next city down on the list for that country, like so...
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]NEW YORK[/TD]
[TD]USA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]LOS ANGELES[/TD]
[TD]USA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]TEXAS[/TD]
[TD]USA[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]LONDON[/TD]
[TD]ENGLAND[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BIRMINGHAM[/TD]
[TD]ENGLAND[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]LIVERPOOL[/TD]
[TD]ENGLAND[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]SYDNEY[/TD]
[TD]AUSTRALIA[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BRISBANE[/TD]
[TD]AUSTRALIA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]TOKYO[/TD]
[TD]JAPAN[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]NAGASAKI[/TD]
[TD]JAPAN[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]PARIS[/TD]
[TD]FRANCE[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]LYONS[/TD]
[TD]FRANCE[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]MARSEILLES[/TD]
[TD]FRANCE[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]GENEVA[/TD]
[TD]SWITZERLAND[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]MUNICH[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BERLIN[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD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]
[TD]0[/TD]
[/TR]
[TR]
[TD]HAMBURG[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]FRANKFURT[/TD]
[TD]GERMANY[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BREMEN[/TD]
[TD]GERMANY[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
...and so on.
The far right column (the 1's and 0's column) is a COUNTIF reading if a given range contains the city. The cells in this range are currently populated manually. The order of the country cell will change from day to day. One example is below (for April 3rd shown above), though the order of the countries/cities will change each day.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]USA[/TD]
[TD]NEW YORK[/TD]
[/TR]
[TR]
[TD]SWITZERLAND[/TD]
[TD]GENEVA[/TD]
[/TR]
[TR]
[TD]GERMANY[/TD]
[TD]BREMEN[/TD]
[/TR]
[TR]
[TD]FRANCE[/TD]
[TD]LYONS[/TD]
[/TR]
[TR]
[TD]ENGLAND[/TD]
[TD]LIVERPOOL[/TD]
[/TR]
[TR]
[TD]AUSTRALIA[/TD]
[TD]BRISBANE[/TD]
[/TR]
[TR]
[TD]JAPAN[/TD]
[TD]TOKYO[/TD]
[/TR]
</tbody>[/TABLE]
I want to know if there is a way to automatically write the city to the appropriate cell (i.e. adjacent to the country the city is in) for each day of the month, according to the selection rules described earlier in this post (rather than eyeballing the table on the day previously to figure out which is the next city to cover). Please note that each country cell will continue to be populated manually. So for the above example, if I enter 'ENGLAND' into cell A1 I want cell B1 to automatically write 'LIVERPOOL'. The next day, when I enter 'ENGLAND' into, say, A3 I want B3 to show 'LONDON' as this is the next city in the list to be covered.
Sorry if this is convoluted. I tried to edit this to make sense, honest!
Last edited: