+ Reply to Thread
Results 1 to 3 of 3

VBA Code Transpose with dynamic range column

  1. #1
    Registered User
    Join Date
    09-23-2022
    Location
    Brasil
    MS-Off Ver
    365
    Posts
    3

    VBA Code Transpose with dynamic range column

    Hello, morning.


    I would like to know if is it possible to make a code that could fit in the attached cenario.

    I need a code that could transform column a into the other columns, as follow the attached archive.

    (Acc xxx) -> refers to the account number
    (Ref xxx) -> refers to the payment/receive reference of the previous row (for example: A4 Ref code, refers to the value in A3 cell).
    (Saldo xxx) -> refers to the actual balance of the previous row (Acc xxx) (for example: A9 "Saldo", refers to the balance of account in A2 cell.)


    The code i'm looking for, should "transpose" the column A into the format of columns/rows of the range "C:P", as follow the example attached.


    The ranges between the (Acc xxx) and it's (Saldo xxx) are dynamic, so they can have more/less payments/receives and their refs, or no payments/receives as the example in the cells A17 and A18, where there's just the "Acc xxx" and it actual balance "Saldo xxx".

    Ignore the first row in the document attached. I just created ir to indicate from/to of what I need the code to do.

    Thank you very much in advance!

    1663941561-Pasta-de-trabalho-1.xlsx
    Last edited by rafapmotta2; 09-23-2022 at 01:32 PM.

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: VBA Code Transpose with dynamic range column

    Hi & welcome to the forum,

    Try below code ... Data will pasted from cell [C15] which you can change
    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  3. #3
    Registered User
    Join Date
    09-23-2022
    Location
    Brasil
    MS-Off Ver
    365
    Posts
    3

    Re: VBA Code Transpose with dynamic range column

    Thank you very much, nankw83.

    I'm very impressed with the code you created for this case.

    Just add a reputation for you.

+ 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] Request = transpose multiple columns of three numbers into a single column and delete blan
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-07-2017, 02:17 PM
  2. Code to select dynamic range based on value in column A
    By tompee29 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2015, 05:28 AM
  3. [SOLVED] Code request to avoide fixed range for copying the data
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-08-2015, 08:57 PM
  4. transpose column to a range calculate and transpose to new table loop
    By moshro1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2015, 10:52 AM
  5. [SOLVED] code for userform to delete combo box value from dynamic range & move column up
    By HeyInKy in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-02-2014, 07:42 PM
  6. Code request to delete numbers in column B automatically
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2014, 12:53 AM
  7. Replies: 5
    Last Post: 07-27-2010, 10:58 AM

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