• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA to Format Data Across Sheets

indy_dan

New Member
I have a source of data on a sheet that I would like to automatically format on another sheet. I have


On the data sheet, I have 3 columns of data, formatted as per this example:


SSAA01 0mo 1/1/1900

SSAA01 12mo 2/2/1901

SSAA02 0mo 3/7/1902

SSAA03 0mo 4/9/1903

SSAA03 18mo 5/11/1904

SSAA03 30mo 6/13/1905

SSAA04 6mo 7/16/1906

SSAA05 0mo 8/18/1907

SSAA05 12mo 9/19/1908

SSAA06 0mo 10/22/1909

SSAA07 0mo 11/24/1910

SSAA07 12mo 12/27/1911

SSAA08 0mo 1/28/1913

SSAA09 0mo 3/2/1914

SSAA11 0mo 4/4/1915

SSAA11 12mo 5/6/1916

SSAA11 24mo 6/8/1917

SSAA12 0mo 7/11/1918

SSAA12 12mo 8/13/1919

SSAA14 0mo 9/14/1920

SSAA16 12mo 10/17/1921

SSAA18 0mo 11/19/1922

SSAA18 12mo 12/22/1923

SSAA18 24mo 1/23/1925

SSAA18 36mo 2/25/1926

SSAA22 0mo 3/30/1927

SSAA22 12mo 5/1/1928

SSAA22 24mo 6/3/1929

SSAA24 12mo 7/6/1930

SSAA25 0mo 8/8/1931

SSAA25 12mo 9/9/1932


First column is an identifier, the middle column is the time point at which a participant enters a study (these can be changed to a numeric value instead of a string if needed). The last column is the date attended.


I would like to reformat this data in the following manner:


0mo 6mo 12mo 18mo 24mo 30mo 36mo 42mo 48mo

SSAA01 1/1/1900 2/2/1901

SSAA02 3/7/1902

SSAA03 4/9/1903 5/11/1904 6/13/1905


Is is possible to match the values from column 2 on the data sheet to the first row on the output sheet and paste the adjacent cell on the correct (column,row)?


I've read through several posts on these forums, but I cannot find anything that matches this criteria. Thanks in advance for any help that can be given!


Dan
 
The formatting desired didn't make it through copy/paste, but the dates should line up under the correct time points.
 
Back
Top