+ Reply to Thread
Results 1 to 10 of 10

Vlookup transpose value, but don't repeat.

  1. #1
    Registered User
    Join Date
    10-21-2015
    Location
    New York
    MS-Off Ver
    MS Office 2013
    Posts
    95

    Vlookup transpose value, but don't repeat.

    Please advise with this:

    A1: 1
    A2: 2
    A3: 3
    A4: 1
    A5: 2
    A6: 7
    A7: 1
    etc..

    B1: 5K
    B2: 2K
    B3: 3.7K
    B4: 4K
    B5: 2K
    B6: 4.5K
    B7: 110K
    etc....


    I need to transpose values from column B to column C.

    If A1: 1 I need to take value from B:1 and place it in C1. If number 1 repeats in Column A (A5), than I need to paste value of B (B5) to D1 etc....

    So in above example, I would have:

    C1: 5K, D1: 4K, E1: 110K etc...


    Please help!

    Thanks a lot!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Vlookup transpose value, but don't repeat.

    Try this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    10-21-2015
    Location
    New York
    MS-Off Ver
    MS Office 2013
    Posts
    95

    Re: Vlookup transpose value, but don't repeat.

    Alan,

    Thanks for your response. I tried this code, but it didn't work. I tried to modify it a bit, it worked, but only getting the last value skipping all the previous.

    Please advise. Thanks

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Vlookup transpose value, but don't repeat.

    Ok insert an empty row above your data.

    Select the formula tab select name manager select new

    enter nn as the name

    enter
    Please Login or Register  to view this content.
    in the refers to box and close the name manager

    enter this formula into cell C2 using ctrl shift and enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Fill this down until you get a blank cell

    enter this formula into cell D2 using ctrl shift and enter

    Please Login or Register  to view this content.
    fill right and down until you get all blanks
    Attached Files Attached Files
    Last edited by mehmetcik; 11-06-2015 at 06:30 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Vlookup transpose value, but don't repeat.

    Worked for me. Attach a copy of your worksheet for testing.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Vlookup transpose value, but don't repeat.

    Enter this in C1 and fill across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    A
    B
    C
    D
    E
    1
    1
    5k 5k 4k 110k
    2
    2
    2k
    3
    3
    3.7k
    4
    1
    4k
    5
    2
    2k
    6
    7
    4.5k
    7
    1
    110k
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Vlookup transpose value, but don't repeat.

    Alan's code runs perfectly. Copy the code, right click on the worksheet tab with the data, click on View Code, Paste the code into the module and click on the red X to exit the VBA editor. Go to the Developer tab, click on Macros, select the macro with "ams" and run.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Vlookup transpose value, but don't repeat.

    Another way
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Row\Col
    A
    B
    C
    D
    E
    F
    1
    1
    5K 5K 4K 110K In C1:E1 =IFERROR(INDEX($B$1:$B$7,(COLUMNS($A:A)-1)*3+1),"")
    2
    2
    2K
    3
    3
    3.7K
    4
    1
    4K
    5
    2
    2K
    6
    7
    4.5K
    7
    1
    110K
    Dave

  9. #9
    Registered User
    Join Date
    10-21-2015
    Location
    New York
    MS-Off Ver
    MS Office 2013
    Posts
    95

    Re: Vlookup transpose value, but don't repeat.

    Guys,

    Sorry for the late response! Thank you very much, I tried all of your ways, all of them work great, including Alan's macro.

    Thanks again for your help guys! Greatly appreciate it!!!! Reputation to all of you guys!

    Rus

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Vlookup transpose value, but don't repeat.

    Glad they worked. Thanks for the feedback and rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] copy column data from multiple tabs onto specified tab, transpose, repeat
    By bruno08102013 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-26-2014, 12:43 PM
  2. Transpose a set of 6 rows to one column and repeat for next columns
    By labamba in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-14-2013, 05:06 AM
  3. [SOLVED] Copy, paste, transpose 4 cells delete and repeat
    By blarsen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-18-2012, 01:29 AM
  4. Repeat copy and paste special (transpose)
    By Mengtzee in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 01-16-2012, 11:38 AM
  5. Repeat Transpose Unequal Rows
    By kirky in forum Excel General
    Replies: 3
    Last Post: 10-24-2010, 07:53 AM
  6. Find, Copy, Transpose, Repeat
    By siddharthariver in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2010, 06:06 PM
  7. Transpose with repeat
    By deepak.kec in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-20-2009, 08:00 AM
  8. How do I transpose entries that repeat in sequence down a column .
    By Anzacdave in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2005, 01:06 AM

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