VB.Net Forum

Ask Question   UnAnswered
Home » Forum » VB.Net       RSS Feeds

Excel Macro help - conditional copy and paste from one worksheet to another

  Asked By: Albert    Date: Dec 18    Category: VB.Net    Views: 9554

Hello, I am a novice at VB for Excel. I have two worksheets in a workbook. (A and B). On Worksheet A, I have a command button and a range of cells where I want the "output" to end up. On Worksheet B, I have three columns involved. In column A is a check box that causes column C to = TRUE if checked or FALSE if not checked. Column B has a data range of cells that I want copied to the "output" range on Worksheet A if the value in the corresonding row of Column C = TRUE. (hope that is clear)

So to recap, what I need is a macro formula that does the following :

1) Click on a command button on worksheet A
2) The click on worksheet A then causes the following :
a) Worksheet B, column C range is looked at for a value of "TRUE". If that criteria is met, the corresponding row in Column B is copied to Worksheet A range output.
b) So to define said criteria, lets say the range of Worksheet B, Column C that is looked at is C13:C45. And let's say that C14, C25, C34 all = TRUE, then only the corresponding Column B cells of B14, B25, and B34 are copied to Worksheet A column E34:E52. Obviously I know that I have a limited amount of rows that can be copied into the range E34:E52, but maybe there is a way to include inserting a new row if E52 is exceeded??

Thank you for any assistance in this.




No Answers Found. Be the First, To Post Answer.