Swap data between rows

blanckdu12

New Member
Joined
May 14, 2014
Messages
3
Hey guys,

I'm working on a spreadhseet using VBA and i was wondering how to go about sorting rows using vba code.

I would like to make a new entry at the bottom of the existing data and then sort columns A-M in order of column A lowest to highest.

I can do this manually using custom sort but the people who will use this are less computer literate and I intend on locking down this entire page. All they will be able to do is enter data into my form which will put the new data in and sort the rows by column A.

But columns after M can't be affected. Only columns A-M can move. This page gets printed if that matters.

Any help here would be much appreciated.

Thanks,
Duane
:confused:
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi,

Can you posrt some Example data, means what exactly u r looking for will get clear to us to help you.
 
Upvote 0
Ok so below is a small example of what I'm working with.

There are 6 columns of data with a banner running down the sixth column.

I want to sort all the data in the first 6 columns in ascending order of the values in column A. But I don't want anything after the first 6 columns to change.


see below.


1 </SPAN>
Ben </SPAN>
Data here</SPAN>
kldklfna </SPAN>
42312312</SPAN>
123123</SPAN>
</SPAN>
2 </SPAN>
George</SPAN>
askdjas;</SPAN>
'</SPAN>
208942</SPAN>
5 </SPAN>
Hung</SPAN>
askdjas;</SPAN>
nsakdnask;</SPAN>
232312</SPAN>
41234</SPAN>
8 </SPAN>
David</SPAN>
fgdf </SPAN>
4</SPAN>
7 </SPAN>
Terry</SPAN>
324trgsdfg </SPAN>
kmsl;dmka</SPAN>
3423424</SPAN>
4</SPAN>
6 </SPAN>
Annabelle</SPAN>
ldf</SPAN>
k</SPAN>
2</SPAN>
24124</SPAN>
3 </SPAN>
name </SPAN>
Data here</SPAN>
123</SPAN>
9 </SPAN>
name </SPAN>
ldf</SPAN>
lskdlakd</SPAN>
23423423</SPAN>
123</SPAN>
10 </SPAN>
name </SPAN>
4656tygf </SPAN>
a</SPAN>
12</SPAN>
22 </SPAN>
other name</SPAN>
t653w2 </SPAN>
332434</SPAN>
52</SPAN>
4 </SPAN>
othjer anme</SPAN>
233 3 </SPAN>
lskdlakd</SPAN>
12123123</SPAN>
512</SPAN>
hope this helps,
Duane

<TBODY>
</TBODY>
 
Upvote 0

Forum statistics

Threads
1,214,411
Messages
6,119,346
Members
448,888
Latest member
Arle8907

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