+ Reply to Thread
Results 1 to 3 of 3

Thread: Transpose and loop or vloop i think

  1. #1
    Registered User
    Join Date
    09-16-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question Transpose and loop or vloop i think

    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.

  2. #2
    Forum Guru mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,984

    Re: Transpose and loop or vloop i think

    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 assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    09-16-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    Smile Re: Transpose and loop or vloop i think

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0