Rearranging rows based on sales and text

SomeGuyHere

New Member
Joined
Aug 24, 2023
Messages
13
Office Version
  1. 2021
Platform
  1. Windows
Hello! I'm trying to use VBA to rearrange rows in the data I have. I want to Make sure all the variations of E and F are grouped together below the highest E or F value. Essentially rearranging rows from the original data in columns A and B to the final arrangement in columns D and E. Is this possible to do? Thank you!
 

Attachments

  • Capture.JPG
    Capture.JPG
    29.5 KB · Views: 9
Do you have an xl2bb table? So that I can copy?
Changing the array to A2:D16 for example is not working?
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Do you have an xl2bb table? So that I can copy?
Changing the array to A2:D16 for example is not working?
Sorry. I've been trying to get that xl2bb add-on working on my work laptop for the past hour. I still can't get it to work. My company probably blocks all add ons.

So changing the array does seem to work for the example I showed you with the letters. Here's another example with different wording and it doesn't sort at all.
 

Attachments

  • Capture.JPG
    Capture.JPG
    43.5 KB · Views: 5
Upvote 0
Maybe:

Excel Formula:
=LET(z,A2:B17,sp,TEXTSPLIT(INDEX(z,,1)," "),SORTBY(z,XLOOKUP(sp,sp,INDEX(z,,2)),-1))
 
Upvote 0
Maybe:

Excel Formula:
=LET(z,A2:B17,sp,TEXTSPLIT(INDEX(z,,1)," "),SORTBY(z,XLOOKUP(sp,sp,INDEX(z,,2)),-1))
Hello again. So the data I work with can vary in row count so I want to cast a broad net in the array box. Is there a way to put those zeros in the image from the result of the formula at the bottom instead of the top?
 

Attachments

  • Capture.JPG
    Capture.JPG
    78 KB · Views: 3
Upvote 0
Hello again. So the data I work with can vary in row count so I want to cast a broad net in the array box. Is there a way to put those zeros in the image from the result of the formula at the bottom instead of the top?
Pretty janky, but I guess this works for me
 

Attachments

  • Capture.JPG
    Capture.JPG
    69.7 KB · Views: 2
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,343
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top