Auto Sort a Row of 4 cells using Macro

Agbarker

New Member
Joined
May 17, 2021
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Hi all,

firstly, this group is amazing! thank you for the help so far.

I am intrigued to know if this is possible.

can you sort 4 Cells in row automatically when one of the cells changes.

so for example
Row 3 - A1,B1,C1,D1 contains L K J M

What i am looking to do is sort these into alphabetical order (left to right) automatically when one letter is changed.

is this possible in Excel?

Note - Row 3 A1:D1 is pulling the info from another place so can be sorted manually without affecting any other formulas
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
18,160
Office Version
  1. 2013
Platform
  1. Windows
You said:
Row 3 - A1,B1,C1,D1 contains L K J M

If it were Row 3 would it not be A3,B3,C3,D3

Or am I missing something?
 

Agbarker

New Member
Joined
May 17, 2021
Messages
11
Office Version
  1. 365
Platform
  1. Windows
You said:
Row 3 - A1,B1,C1,D1 contains L K J M

If it were Row 3 would it not be A3,B3,C3,D3

Or am I missing something?
nope your correct I should have put A3,B3,C3,D3

also on the note as well, Row 3 A1:D1 should be A3:D3
 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
18,160
Office Version
  1. 2013
Platform
  1. Windows
You also said:
sort these into alphabetical order (left to right) automatically when one letter is changed.

And how does this change occur?
Is this changed manually when you enter a value into a cell. Or does it change do to a formula ?
 

Agbarker

New Member
Joined
May 17, 2021
Messages
11
Office Version
  1. 365
Platform
  1. Windows
So, (will make sure to be right this time) 😆

A1:D1 = each cell has a formula in which produces an answer which is A to Z - so it could look like D,K,A,R

then on row 3, A3:D3 = each cell has =$A$1, =$B$1, =$C$1, =$D$1

What I currently do is sort by row alphabetically, using the sort function, basically I am just looking for a way to sort this automatically
 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
18,160
Office Version
  1. 2013
Platform
  1. Windows
There is no Vba script that can run a script because of a formula causing a change.

But then wait a while and someone else here on the forum may have a answer
 

Forum statistics

Threads
1,147,960
Messages
5,744,046
Members
423,843
Latest member
alex2022

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
Top