Hello:
my excel spreadsheet looks like below where there are many products listed vertically.
I was able to use Transpose to change the vertical to the horizontal by the following Macro.
'
ActiveCell.Range("A1:A8").Select
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Sheet1").Select
End Sub
Sheet 1
Productname
Productcode: GL010
Spec:
Price: $168
Description:
Casepack
unit price
$3.50
Productname2
Productcode: GL012
Spec2:
Price: $100
Description2:
Casepack2
unit price2
$4.60
Sheet 2
Productname Productcode: GL010 Spec: Price: $168 Description: Casepack unit price $3.50
There are some empty lines between each productname and can anyone help out please as to how i can repeat the marco for the next productname? i think it is something to do with loop or vloop. All I really need is the first col. Product name and the Price $168 and the unit price $3.5
Many Thanks for your help.
Last edited by dndjones00; 09-16-2011 at 02:48 AM.
Hi & Welcome dndjones00
Please read Forum Rules
Your posting breaks the following rule
3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Select your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button). The result will appear like this in the post window:
Is ther the same number of rows between each product
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
hello,
have i done it correctly now?
sorry, my mistake, yes it only has one empty row inbetween each product as listed in that sequence.
many thanks.
Last edited by dndjones00; 09-16-2011 at 02:41 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks