Lining up rows of data

jayemoh77

Board Regular
Joined
Feb 2, 2012
Messages
56
I have a very long list of data. Is there a way to quickly line up two rows?</SPAN>
example:</SPAN>

I import data into Excel 2007 and get this results:</SPAN>

<COLGROUP><COL style="WIDTH: 48pt" width=64><TBODY>
</TBODY>
A</SPAN></SPAN>
B</SPAN></SPAN>
C</SPAN></SPAN>
D</SPAN></SPAN>
1</SPAN></SPAN>
1</SPAN></SPAN>
6</SPAN></SPAN>
ECMO OR TRACH</SPAN></SPAN>
2</SPAN></SPAN>
2</SPAN></SPAN>
9</SPAN></SPAN>
TRACH W MV </SPAN></SPAN>
3</SPAN></SPAN>
6</SPAN></SPAN>
10</SPAN></SPAN>
CRANIO W MAJOR </SPAN></SPAN>
4</SPAN></SPAN>
8</SPAN></SPAN>
17</SPAN></SPAN>
CRANIOTOMY </SPAN></SPAN>
5</SPAN></SPAN>
9</SPAN></SPAN>
22</SPAN></SPAN>
EXTRACRANIAL </SPAN></SPAN>
6</SPAN></SPAN>
10</SPAN></SPAN>


7</SPAN></SPAN>
12</SPAN></SPAN>


8</SPAN></SPAN>
14</SPAN></SPAN>


9</SPAN></SPAN>
17</SPAN></SPAN>


10</SPAN></SPAN>
22</SPAN></SPAN>



<TBODY>
</TBODY>
I want this result:
A</SPAN></SPAN>
B</SPAN></SPAN>
C</SPAN></SPAN>
D</SPAN></SPAN>
1</SPAN></SPAN>
1</SPAN></SPAN>


2</SPAN></SPAN>
2</SPAN></SPAN>


3</SPAN></SPAN>
6</SPAN></SPAN>
6</SPAN></SPAN>
ECMO OR TRACH</SPAN></SPAN>
4</SPAN></SPAN>
8</SPAN></SPAN>


5</SPAN></SPAN>
9</SPAN></SPAN>
9</SPAN></SPAN>
TRACH W MV </SPAN></SPAN>
6</SPAN></SPAN>
10</SPAN></SPAN>
10</SPAN></SPAN>
CRANIO W MAJOR </SPAN></SPAN>
7</SPAN></SPAN>
12</SPAN></SPAN>


8</SPAN></SPAN>
14</SPAN></SPAN>


9</SPAN></SPAN>
17</SPAN></SPAN>
17</SPAN></SPAN>
CRANIOTOMY </SPAN></SPAN>
10</SPAN></SPAN>
22</SPAN></SPAN>
22</SPAN></SPAN>
EXTRACRANIAL </SPAN></SPAN>

<TBODY>
</TBODY>
thank you!!! :)
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Use vlookup

From how your data is set up in the first instance:
e1: =iferror(vlookup(b1,$c$1:$D$5,2,0),"")
^^Drag down.

You can move the data around, but I hope you see how the function works.
 
Upvote 0
WOW! Thank you so much. It works like a charm.

I failed to mention that there is an additional column of numbers in column E which sould move with Column D. I attempted to make the appropriate adjustment to the formula but it is not working for me.

An edit to e1: =iferror(vlookup(b1,$c$1:$D$5,2,0),"") would be hugely appreciated.

THANK YOU!
 
Upvote 0
If you post where the data are I can adjust it for you. Try to figure it out though, vlookup() is very powerful and worth knowing if you work in excel often.
 
Upvote 0
I tried and I cant seem to get the results im looking for :mad:
After import into excel:
A
B
C
D
E
F
1
Code
Code
Description
Count
2
1
6
ECMO OR TRACH</SPAN>
2
3
2
9
TRACH W MV </SPAN>
5
4
6
10
CRANIO W MAJOR </SPAN>
4
5
8
17
CRANIOTOMY </SPAN>
2
6
9
22
EXTRACRANIAL </SPAN>
3
7
10
8
12
9
14
10
17
11
22

<TBODY>
</TBODY>

Desired results:
A
B
C
D
E
F
1
Code
Code
Description
Count
2
1
</SPAN>
3
2
</SPAN>
4
6
6
</SPAN>ECMO OR TRACH
2
5
8
</SPAN>
6
9
9
TRACH W MV </SPAN>
5
7
10
10
CRANIO W MAJOR
4
8
12
9
14
10
17
17
CRANIOTOMY
2
11
22
22
EXTRACRANIAL
3

<TBODY>
</TBODY>

THANK YOU!
 
Last edited:
Upvote 0
I tried and I cant seem to get the results im looking for :mad:
After import into excel:
ABCDE F
1CodeCodeDescriptionCount
216ECMO OR TRACH</SPAN>2
329TRACH W MV </SPAN>5
4610CRANIO W MAJOR </SPAN>4
5817CRANIOTOMY </SPAN>2
6922EXTRACRANIAL </SPAN>3
710
812
914
1017
1122

<TBODY>
</TBODY>




















Desired results:
ABCDE F
1CodeCodeDescriptionCount
21</SPAN>
32</SPAN>
466</SPAN>ECMO OR TRACH2
58</SPAN>
699TRACH W MV </SPAN>5
71010CRANIO W MAJOR 4
812
914
101717CRANIOTOMY 2
112222EXTRACRANIAL3

<TBODY>
</TBODY>





















THANK YOU!
 
Upvote 0
I tried and I cant seem to get the results im looking for :mad:
After import into excel:
ABCDE F
1CodeCodeDescriptionCount
216ECMO OR TRACH</SPAN>2
329TRACH W MV </SPAN>5
4610CRANIO W MAJOR </SPAN>4
5817CRANIOTOMY </SPAN>2
6922EXTRACRANIAL </SPAN>3
710
812
914
1017
1122

<TBODY>
</TBODY>

Desired results:
ABCDE F
1CodeCodeDescriptionCount
21</SPAN>
32</SPAN>
466</SPAN>ECMO OR TRACH2
58</SPAN>
699TRACH W MV </SPAN>5
71010CRANIO W MAJOR 4
812
914
101717CRANIOTOMY 2
112222EXTRACRANIAL3

<TBODY>
</TBODY>

THANK YOU!
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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