+ Reply to Thread
Results 1 to 7 of 7

Index() & Match() or just an if() Statement?

  1. #1
    Registered User
    Join Date
    10-05-2005
    Posts
    34

    Index() & Match() or just an if() Statement?

    Okay I have lots and lots of info in Sheet 1 that has the data vertically. Also I have a column A that has a unique number that identifies each set of data. The data type in column B is consistant and repeating the info/DATA is the ever changing.
    HTML Code: 
    HTML Code: 
    How do I write a formula that will give me what I need.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075
    Quote Originally Posted by JustMe602
    But I would like the data Horizantally:
    Select the range of cells you wish to rearrange and copy. Then in cell A1 of a blank worksheet click on Edit, Paste Special, Transpose.
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    Registered User
    Join Date
    10-05-2005
    Posts
    34

    Yeah I knew about that.... but

    I have 6,481 rows of data in sheet 1 and I would have to do this 324 times (the number groups of data) and then that is not a dynamic way of solving my problem.


    Thanks for the response.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    If your data in Col A and B enter this in C1 and drag to D1 etc and drag down to C2 and D2 etc

    =IF(OFFSET(INDIRECT(ADDRESS(1,ROW(),4)),COLUMN()-3,0)=0,"",OFFSET(INDIRECT(ADDRESS(1,ROW(),4)),COLUMN()-3,0))

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    I know you didn't say it this way, but the following formula assumes that you are putting your data starting in cell E2, F2, etc...

    It also assumes that your column B data is starting in B1. It also assumes your data is regular, ie. there are (in my example) 20 separate headings that have to be filled in. ie. Exactly 20 rows/line. (I'm slightly skeptical of this, as 324 does not divide 6481 exactly, but it will be up to you to rectify.)

    Please Login or Register  to view this content.
    Just drag it across and then drag down.

    You'll probably want to Copy and Paste Special -> Values afterwards.

    Scott

  6. #6
    Registered User
    Join Date
    10-05-2005
    Posts
    34

    Okay I still can't get that formula to work...

    I have attached a spreadsheet that has what I am trying to protray.

    I have the data on Sheet 1 and trying to transpose the data to the format in Sheet 2.

    Thanks all help is apprieciated.
    JustMe.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Ok, I put the formula on the first 3 lines of Sheet2. (Modified to allow for blank cells)

    You can see the correspondence by looking at the values I put in Sheet1, Column C.

    Drag to the bottom of your data... then I'd recommend Copying the whole thing and using Paste Special -> Values.

    Scott
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.6.0 RC 1