Transpose Excel row data to a form

Seeone

New Member
Joined
Apr 5, 2011
Messages
3
Hello all,

I have a sheet with a lot of rows of data, representing certain products and would like to transpose this to a sheet / form to send to clients (kind of like an invoice).

I can build a basic macro to copy the relevant cells in each row to the template, but i would like to be able to have a checkbox at the start of each row of data, so that when i ran the macro it will generate a form for each of the rows / products i have selected. :confused:

Please can you help?

My Excel knowledge is of a resaonable standard (not too advanced) but VB is all pretty new to me.

Thanks!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Instead of a checkbox at the start of each row, insert a new column and make the values TRUE or FALSE ( as to whether to include in the processing ). Then you could loop through the contents of that column and test the value and process accordingly, or even do Advanced Filter to copy the subset to another range and simply process all entries in that range.
 
Upvote 0
Thanks Glenn - this is a good bit of advice as i need to also be able to copy down the rows with the same formating - something which i think could be a problem using checkboxes.

Could you give me more guidance as to the code i would write if i used 'True' or 'False' as the designation for whether i wanted the macro to apply to a given row?

I'm very new to VB and am stumbling thru this process at present. It's a lot more luck than judgement at this stage!

Cheers,
Seeone
 
Upvote 0
Not knowing what you are wanting to do with each row, this is a general idea:
Code:
For Each c In Range("A2:A999")
   If c.Value="" Then Exit For
   If c.Value Then
       ' do whatever processing for the row
   End If
Next
 
Upvote 0
Thanks again Glenn.

I am trying to copy data from given row to a template i have set up on another tab.

Currently I can copy the data for the test row i set up, but want to be able to have multiple rows of data which can be used to populate a template (This may also require me to copy the template in line with the number of rows which are 'TRUE'?), depending in whether i have them designated as 'TRUE' in column A (A1, A2, A3, etc.).

The problem I am facing is i) how to make the code apply to any row (i.e. not just A2:A10) and ii) how to apply the macro to the rows which are 'TRUE'.

Hmmmm..... will keep on trying, but if you can give anymore guidance, that would be great.

Thanks,
Seeone.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,399
Members
448,958
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top