Link to home
Start Free TrialLog in
Avatar of MilesLogan
MilesLoganFlag for United States of America

asked on

Separate items into a different row in Excel

Hello EE

Can someone assist me with this please , I need to be able to separate the items in Column B into a separate Row .
User generated imageUser generated image
Avatar of Darrell Porter
Darrell Porter
Flag of United States of America image

It is a 2-step process.
The first step involves converting the multi line cell to multiple columns.  This is done in native Excel and can be recorded as a macro.
Select column B
From the ribbon, select Data
From the Data menu, select Text to Columns
From the Text to Columns Wizard, select Delimited then select Next.
At Step 2 of the Wizard, uncheck all options and select Other.
In the box next to Other hold the Alt key down and type 0010.
Select Next on Step 2.
At Step 3 of the Wizard, in the Destination field, enter =$D$1 and select Finish.
Now you should have each item in column B in columns D through as many columns as are needed on the same line as the machine name.

If you record this as a macro, you can see how this is performed programmatically.
For a reference to the function, please review this link on the Microsoft MSDN site.
Or, if this is being generated via Powershell, post your script (use the CODE link and paste your script into the code block) and we might be able to change the script to provide you with exactly what you want rather than gathering the data in one place and massaging it into shape in another.
How about a sample file for testing? I do not wish to type this.
Another option could be to use the pivot table option. You can do do easily.
User generated image

Here is a sample in attachment
Pivot-Table_no1.xlsx
I believe you're using Powershell to read AD.

Likely something along the lines of

Get-ADPrincipalGroupMembership (Get-ADComputer [b]MachineName1[/b]).DistinguishedName

Open in new window

and piping it out to a CSV.

Have you tried something like this, where AllComputers.TXT is a list of the computers whose membership you want to identify.

Import-Module ActiveDirectory
Get-Content C:\Scripts\AllComputers.txt | Get-ADComputer $_ -Properties memberOf |
Select-Object -Property @{N= "Name";E= {$_.samaccountname}},@{N= "Groups";E={$_.Memberof}} |
export-csv -path C:\Data\AllComputers_results.csv -append

Open in new window

Avatar of MilesLogan

ASKER

HI WalkabouTigger when I pull the data via Powershell it is in the correct format but it takes much longer to get . This data is being generated from IBM BigFix and apparently this is the only way they can get me the data .

So I cant do this option below .
Other hold the Alt key down and type 0010.

When I press the ALT key and I try to enter 0010 it beeps , does not allow me to enter them.
HI Wilder1626

Can you show me how you did that ?
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
MilesLogan

See this small video that will show you how to do this.

Let us know if you have any questions.
Pivot-table-No1.zip
Hi Sudohn , this worked perfect .. thank you so much
You're welcome MilesLogan! Glad to help.
Nice solution, Subodh.

Having dealt with BigFix in the past, you have my sincerest sympathies, Miles.
@WalkaboutTigger
Thanks for the appreciation. :)