Hello, I am new to this forum and i am struggling with data i have in excel that i need to transpose using VbScript. I have data as noted below. Any help that can be provided would be most appreciated.
Value Title
Testing test
oak test1
cherry test2
yellow test1
green test1
brown test2
blue test
red test3
pink test4
I need my data to look like this with pulling unique of the titles and matching the values that correspond and pasting it to the correct column.
Current Code:
Option Explicit
Dim objReadXL, objReadWB, objReadWS, Lst_row, Lst_col, intRow,
Const xltoleft = -4159
Const xlup = -4162
Const xlDown = -4162
Const xlYes = 1
'Create excel object to read
Set objReadXL = CreateObject("Excel.Application")
objReadXL.Visible = True
Set objReadWB = objReadXL.Workbooks.Open("C:\Scripts\Testing\test.xlsx") 'Change the path of your excel file
Set objReadWS = objReadWB.Sheets("Sheet1") 'Change the name of sheet as in your file
Do until objReadWS.Cells(intRow, 2).Value = ""
Value Title
Testing test
oak test1
cherry test2
yellow test1
green test1
brown test2
blue test
red test3
pink test4
I need my data to look like this with pulling unique of the titles and matching the values that correspond and pasting it to the correct column.
test | test1 | test2 | test3 | test4 |
testing | oak | cherry | red | pink |
blue | yellow | brown | ||
green |
Current Code:
Option Explicit
Dim objReadXL, objReadWB, objReadWS, Lst_row, Lst_col, intRow,
Const xltoleft = -4159
Const xlup = -4162
Const xlDown = -4162
Const xlYes = 1
'Create excel object to read
Set objReadXL = CreateObject("Excel.Application")
objReadXL.Visible = True
Set objReadWB = objReadXL.Workbooks.Open("C:\Scripts\Testing\test.xlsx") 'Change the path of your excel file
Set objReadWS = objReadWB.Sheets("Sheet1") 'Change the name of sheet as in your file
Do until objReadWS.Cells(intRow, 2).Value = ""