VB program for excel sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Currently im doing a program in spreadsheet. I need to bring the value in
each cell to next sheet. For information, i have enter value in 6 rows in
column 1 sheet 1 and i want the value copy to sheet 2 column 1 by
automatically. when i entered values in 6 rows in column 2 it should copy
same in sheet 2. What the VB code and the loops for that?

Please help me.

dave
 
Any specific rows?
To what row on sheet2
etc

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
"Dave VB logic for excel" <Dave VB logic for
(e-mail address removed)> wrote in message
news:[email protected]...
 
if you want it to be automatic, why not put linking formulas in sheet2

in sheet2 cell A1
=if(sheet1!A1="","",Sheet1!A1)

then drag fill down the column as far as you would think you would ever
enter values in sheet1.
 
Any rows. Do you need any example?

Don Guillett said:
Any specific rows?
To what row on sheet2
etc

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
"Dave VB logic for excel" <Dave VB logic for
(e-mail address removed)> wrote in message
 
Can i apply this logic to all the cell ?

Tom Ogilvy said:
if you want it to be automatic, why not put linking formulas in sheet2

in sheet2 cell A1
=if(sheet1!A1="","",Sheet1!A1)

then drag fill down the column as far as you would think you would ever
enter values in sheet1.
 
Tom,

Thank you very much. I need another help. Example i got 3 section in sheet 2.
Section A , Section B and Section C. For this 3 section i've create a
particular space. A1 till A10 - Section A, A12 till A22 - Section B and A25
till A35 - Section C. When i enter detail in sheet 1 and in particular column
i will put C and the system should bring all the details from that row to
section C. When i put B, all the details should be copied to Section B. How
to do this?

After that, let say section A1 till A10 is full and i want to keep on ke in
information after A11, how to do this by automatically?

Please help me.
 
You say you are doing a program. Most programs have to be run. What do you
mean by automatic? What does your program do so far and how does this
functionality need to be incorporated in your program.

When you figure out all the particulars of what you want to do, then maybe
someone can provide a suggestion.

Right now it seems like you need to look at
http://www.cpearson.com/excel/events.htm

You can then use the events to trigger the code you write that does the
things you need done.
 
Tom,

I've give the full information about the help i need. Please se below:
Let me explain in detail. I'm doing a payment sheet in excel for farmers.
Farmers used to sell and buy land among them but it must go through under our
department because we gave subsidies for them. There's 3 type of region NON
SDA, SDA and MOORLAND.

Please see the example below:

Sheet 1

This is the table that we enter detail of what the farmers received.


A2 D2 E1 F1

A3 D3 E2 F2

A4 D4 E3 F3

A5 D5 E4 F4

A5 D6 E5 F5

A7 region D6 E6 F6





Sheet 2

( NON SDA )


SDA


Moorland





When I enter information in sheet1, it should bring the detail automatically
to sheet 2 according to the region. Let say in Sheet 1 box A7 I enter NON
SDA, all the detail in the table should transfer automatically to below NON
SDA table in Sheet2.

How to do that? Whats the formula?

Please help me.
 
It wouldn't be a formula if you want to accumulate the data on sheet2. You
would need a macro as you originally proposed. It would just be a matter of
determining what was entered and then going to the appropriate location in
the second sheet and writing the data using the change event.

However, if you are accumulating the data, then having your data laid out
vertically on sheet2 would seem like a poor choice - then again, you know
what you are doing and I don't
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top