View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default is it possible to ask excel to input from another sheet?

"sumesh56" wrote:
I have downloaded your macro enabled file. there are three sheets.
It is not clear for me where is the result displayed. I am not able
to understand what exactly has to do. I have not the experience of
using macros. shall I ask?


Your questions are very appropriate. I apologize for not explaining things
more completely.

My uploaded file is based on your original file that has a Seating Plan and
a Distribution worksheet. The third worksheet titled "NEW Distribution ..."
is the result of executing the macro.

In the final version of my uploaded file, I have __two__ macros: one that
sorts the Seating Plan data by roll number (makeDistrib2), and one that does
not (makeDistrib1).

Use one or the other; your choice. You can delete the macro you do not use,
if you wish. I provide some VBA usage instructions at the end below.

-----

"sumesh56" wrote:
2)In my original ws, the rows where the data started were
not identical in both the sheets. In seating plan it
started from row 2 whereas in distribution it started from
row6. can i delete the upper blank rows in sheet
distribution without affecting your code?


Yes. I tried to make things as flexible as possible, relying on as little
as possible. Hopefully the following explanation will make that clear.

-----

"sumesh56" wrote:
1)I want to try your code. Please instruct me in detail
what to do.

[....]
3)To work your code,what are the things I must have? If I
have only the sheet seatingplan and if I apply your code
to it will I get the distribution sheet as an effect of
the macro? Or should I have the distribution! with blank
cells from C:E to get the results?


I assume you provide both the Seating Plan worksheet with all the details
and a Distribution worksheet with tables that can be used as template.

That is what you described in your original posting, to wit: "then copy
paste the concerned lines (col C:E) to the distribution sheet".

(The macro deletes any pre-existing data that might be in columns C:E in the
Distribution tables.)

You can add and remove tables in the Seating Plan and Distribution
worksheets, as long as you adhere to the following expections.

1. The Distribution worksheet must have at least the same tables (exam
rooms) that are referenced in column C of the Seating Plan.

It can have more tables for exam rooms that are not referenced in the
Seating Plan.

2. Each Distribution table (exam room) must have at least as many rows as
there are references to that table in the Seating Plan.

The Distribution tables can have more rows than are not needed. For
example, exam room XI-B has 4 rows, but only 3 rows are used.

3. The title in column B in each Seating Plan table must be "EXAM ROOM". It
does not matter if it is uppercase, lowercase or mixed case.

4. The title in column B in each Distribution table must be "CLASS". Again,
it does matter if it is uppercase, lowercase or mixed case.

NOTE: In a later posting, you say the Seating Plan table title in column B
is now "ROOM", not "EXAM ROOM". Either change the title to "EXAM ROOM" (you
can use Find And Replace), or download an updated version of my file and
change the values of distribTitle and seatingTitle.

5. There must be at least one empty row between tables in both the Seating
Plan and Distribution worksheets.

6. The merged cells in column B in each Distribution table must include
__all__ rows in the table, including unused rows.

You do that already in column B. But I notice you did not always do that in
column G ("TOTAL NOS"). That's okay because the macros do not depend on
column G. But I wanted to be sure you do not make that "mistake" in column
B.