Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Data validation across worksheets


Hi,

I track the population in a large homeless shelter (total capacity
1,000). As I fill the beds for the eveing, I often need a reminder that
a particular bed is not available as I am giving out beds that are
available.

In this case, a letter indicates the dorm, a number indicates the bed.
At the beginning of the day, I enter my occupied beds into columns then
record on a second sheet the persons who we are taking in for the night.


(For simplicity, I am using a small range of data to demonstrate)

In a workbook, I have a range of data in columns on Sheet 1. The column
headings (Dorms) are A through C and the data (Beds) runs from 1 to 10
in each column. This grid represents the occupied beds in each
dormitory.

A B C
3 2 1
5 4 2
7 9 8

From the data above, A3, A5, A7, B2, B4, B9, C1, C2 and C8 are beds are
already occupied.

On Sheet 2 in the workbook, there are a series of rows that indicate
the incoming person who received a particular bed. Along with Name, Age
and ID cells in each row are two cells; in the first cell I would enter
the letter A, B, or C (Dorm). In the next cell, I would enter a number
1 to 100 (Bed).

The rows looks like this:
Last First DOB ID Dorm Bed
Doe John 1/1/49 12345 A 3


The task is this: After adding numbers to the columns on the first
page, I would like to receive an error message should I enter matching
information on the second page. Using the info above, entering an "A"
in the Dorm cell, then entering a "3" in the Bed cell would produce the
warning ("Bed Occupied" or something like that). Entering an "A" then
"1" would not produce any message.

Ideally I would like this to be an event triggered when the two "row
cells" combine to match the column heading and a number it its data
range. Possibly done with VBA.

Thoughts?

Thanks

Joe


--
josephrowan
------------------------------------------------------------------------
josephrowan's Profile: http://www.excelforum.com/member.php...o&userid=14407
View this thread: http://www.excelforum.com/showthread...hreadid=389676

  #2   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Data validation across worksheets

Try a formula approach ?

You have in Sheet1, cols A to C,
headers: A, B, C in A1:C1 and data from row2 down

A B C
3 2 1
5 4 2
7 9 8


In Sheet2, this table is in cols A to F,
headers in A1:F1, data from row2 down

Last First DOB ID Dorm Bed
Doe John 1/1/49 12345 A 3


Let's use an adjacent col G to provide the check status for each row

Put a label, say: "Check" in G1

Put in G2, array-enter the formula (press CTRL+SHIFT+ENTER):

=IF(ISNUMBER(MATCH(F2,OFFSET(Sheet1!$A:$A,,MATCH(E 2,Sheet1!$1:$1,0)-1),0)),"
Bed Occupied !!","")

Copy G2 down as far as required

Col G will indicate :"Bed Occupied !!" if the inputs in cols E and F match
with what's in Sheet1. If everything's cool, col G will remain blank.
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"josephrowan"
wrote in message
...

Hi,

I track the population in a large homeless shelter (total capacity
1,000). As I fill the beds for the eveing, I often need a reminder that
a particular bed is not available as I am giving out beds that are
available.

In this case, a letter indicates the dorm, a number indicates the bed.
At the beginning of the day, I enter my occupied beds into columns then
record on a second sheet the persons who we are taking in for the night.


(For simplicity, I am using a small range of data to demonstrate)

In a workbook, I have a range of data in columns on Sheet 1. The column
headings (Dorms) are A through C and the data (Beds) runs from 1 to 10
in each column. This grid represents the occupied beds in each
dormitory.

A B C
3 2 1
5 4 2
7 9 8

From the data above, A3, A5, A7, B2, B4, B9, C1, C2 and C8 are beds are
already occupied.

On Sheet 2 in the workbook, there are a series of rows that indicate
the incoming person who received a particular bed. Along with Name, Age
and ID cells in each row are two cells; in the first cell I would enter
the letter A, B, or C (Dorm). In the next cell, I would enter a number
1 to 100 (Bed).

The rows looks like this:
Last First DOB ID Dorm Bed
Doe John 1/1/49 12345 A 3


The task is this: After adding numbers to the columns on the first
page, I would like to receive an error message should I enter matching
information on the second page. Using the info above, entering an "A"
in the Dorm cell, then entering a "3" in the Bed cell would produce the
warning ("Bed Occupied" or something like that). Entering an "A" then
"1" would not produce any message.

Ideally I would like this to be an event triggered when the two "row
cells" combine to match the column heading and a number it its data
range. Possibly done with VBA.

Thoughts?

Thanks

Joe


--
josephrowan
------------------------------------------------------------------------
josephrowan's Profile:

http://www.excelforum.com/member.php...o&userid=14407
View this thread: http://www.excelforum.com/showthread...hreadid=389676



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Data validation across worksheets


Max,

That works great. No need to get into any weird VBA with something so
simple. I should post here more often!

Thanks again

Joe


--
josephrowan
------------------------------------------------------------------------
josephrowan's Profile: http://www.excelforum.com/member.php...o&userid=14407
View this thread: http://www.excelforum.com/showthread...hreadid=389676

  #4   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Data validation across worksheets

Glad to hear that!
Thanks for the feedback
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"josephrowan"
wrote in message
...

Max,

That works great. No need to get into any weird VBA with something so
simple. I should post here more often!

Thanks again

Joe



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom data validation on cells with data validation values AKrobbins Excel Worksheet Functions 2 June 21st 11 04:20 PM
how do I share data validation lists between worksheets? DL101 Excel Discussion (Misc queries) 6 September 1st 09 04:04 PM
Data Validation on several worksheets SUSAN Excel Discussion (Misc queries) 3 December 4th 07 09:48 PM
All Worksheets in a Data Validation combo [email protected] Excel Worksheet Functions 1 November 11th 06 08:58 AM
Data Validation drop down for multiple worksheets singla Excel Worksheet Functions 0 December 14th 05 05:56 PM


All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"