ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using Command Button to copy cells (https://www.excelbanter.com/excel-discussion-misc-queries/23999-using-command-button-copy-cells.html)

Pennington

Using Command Button to copy cells
 
I have a command button on each sheet in a workbook except the last sheet.
How do I code each command button to copy TRUE values from a range of cells
on the same sheet into the last sheet so that the values are displayed
sequentially under a heading that is the value of a specific cell on the shee
from which they came? Or .
On Sheet 1. if any Cells(A3:M50)=TRUE Copy Sheet 1 Cell(A1) to Sheet6 A1 and
the values of the TRUE cells below it
One sheet 2 if any Cells(A3:M50)=TRUE Copy Sheet 2 Cell(A1) to Sheet6 in the
next blank cell in column A and the values of the TRUE cells below it.





Otto Moehrbach

You say:
"under a heading that is the value of a specific cell on the sheet from
which they came?" but your examples do not demonstrate this. Did I miss
something?
To answer your question, you would use the same macro for each of the
command buttons. The code in the macro would operate on the active sheet
and copy to Sheet6.
But I don't understand what you want copied if any of those cells
(A3:M50) are True. If you wish, send me a sample of what you have and
include some examples of what you want copied and show where you want the
pasted values. My email address is . Remove the "nop"
from this address. HTH Otto
"Pennington" wrote in message
...
I have a command button on each sheet in a workbook except the last sheet.
How do I code each command button to copy TRUE values from a range of
cells
on the same sheet into the last sheet so that the values are displayed
sequentially under a heading that is the value of a specific cell on the
shee
from which they came? Or .
On Sheet 1. if any Cells(A3:M50)=TRUE Copy Sheet 1 Cell(A1) to Sheet6 A1
and
the values of the TRUE cells below it
One sheet 2 if any Cells(A3:M50)=TRUE Copy Sheet 2 Cell(A1) to Sheet6 in
the
next blank cell in column A and the values of the TRUE cells below it.








All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com