Jul 17 2022 03:51 PM
I have five rows of data such as:
Name
Title
Telephone
Address
Company
These 5 rows repeat over and over in one column. I need to sort them alphabetically by Name but have the 4 accompanying rows stay with the Name row when sorted. Can someone give me directions how to do this?
I also copied this data into Word in case it can be more easily done there.
Jul 17 2022 07:31 PM
Jul 17 2022 07:46 PM
Website name: fake.com |
Website URL: http://fake.com/cleaner |
Login name: |
Login: email address removed for privacy reasons |
Password: fake |
Comment: |
--- |
Website name: fakealso.com |
Website URL: http://fakealso.com/cleaner |
Login name: |
Login: email address removed for privacy reasons |
Password: fakealso |
Comment: |
--- |
Website name: fake1.com |
Website URL: http://fake1.com/cleaner |
Login name: |
Login: email address removed for privacy reasons |
Password: fake1 |
Comment: |
--- |
Jul 17 2022 08:09 PM
Jul 17 2022 08:14 PM
Jul 17 2022 10:07 PM
Jul 17 2022 10:34 PM
Jul 17 2022 11:00 PM
The picture was only an illustratiion to show what the Input is (simulates your data) and what we get as Output after applying a Power Query "script" (not VBA/macro), assuming you run at least Excel 2016 on Windows
To experiment it:
- Download the file attached to my previous reply
- Copy/Paste some of your data in the blue table (In)
- Right-click in the green table (Out) > Refresh
Jul 18 2022 03:11 AM
Jul 18 2022 03:34 AM
In your initial post you didn't talk about blank/empty rows. So please enter or copy/paste in the blue table (In) I shared a respresentative actual sample (can be 100s or rows no problem), save the file then share it with i.e. OneDrive, Google Drive...
I'll see if it's consistent enough to revise the shared Power Query code
Jul 18 2022 04:02 AM
Jul 18 2022 05:03 AM
Sorry but this won't work...
1/ You marked one of you reply as Best response. This is misleading as the case is obviously not solved
2/ In your last reply you talk about line1 through line4 while initially you said you had 5 and in your reply to @Harun24HR we see 6 rows/lines (Comment) before possible empty/blank rows + those possible empty/blank rows seem not to be blank. Still in reply to @Harun24HR I see "---"
3/ Now you ask the output on a single row (not a problem)
Please understand nobody can adapt the query (or use another method) without a clear understanding of what must the removed first (i.e. blank rows) and how many rows exist in each "block" after that
If you carefuly follow the instructions on this page you should be able to share your sample workbook (Share a file or folder) and reply here with the shared link (Get a link for sharing)
Thanks
Jul 19 2022 06:41 PM
Jul 20 2022 02:41 AM
Solution
Worst case scenario click this link that will open Excel online. I shared that file so you can copy/paste your values only . Don't go to fast, there are couple of things you must pay attention to:
1 - When the file opens in Excel Online it's in Viewing mode. You must click on Viewing and select Editing. Then you can copy/paste your data
2 - Once your data are in the sheet, wait a few seconds until you see at the top left Saved to OneDrive
after that just close your web browser window & post a message here to say your data are available online
Jul 20 2022 10:52 AM
Jul 20 2022 02:41 AM
Solution
Worst case scenario click this link that will open Excel online. I shared that file so you can copy/paste your values only . Don't go to fast, there are couple of things you must pay attention to:
1 - When the file opens in Excel Online it's in Viewing mode. You must click on Viewing and select Editing. Then you can copy/paste your data
2 - Once your data are in the sheet, wait a few seconds until you see at the top left Saved to OneDrive
after that just close your web browser window & post a message here to say your data are available online