PC Review


Reply
Thread Tools Rate Thread

Aligning numbers in seperate columns

 
 
Dr Jones
Guest
Posts: n/a
 
      24th May 2006

Hi all,

I have a bit of a problem I can't figure out although I think I migh
be missing something very obvious.

Basically I have this data for example formatted like this
A B C
1 1 2 SAMPLE1
2 2 5 SAMPLE2
3 3 6 SAMPLE3
4 4
5 5
6 6

I want to be able to align Column B's numbers with those in A and tak
C along for the ride

--
Dr Jone
-----------------------------------------------------------------------
Dr Jones's Profile: http://www.excelforum.com/member.php...fo&userid=3474
View this thread: http://www.excelforum.com/showthread.php?threadid=54508

 
Reply With Quote
 
 
 
 
Pete_UK
Guest
Posts: n/a
 
      24th May 2006
Do you mean that you want column A right-aligned and column B
left-aligned, so that in your example data it would look like you have
12, 25, 36 etc? If so, then highlight column B and click the left-align
icon - if this is not visible you can click Format | Cells etc.

I'm not sure what you want to do with column C.

Hope this helps.

Pete

 
Reply With Quote
 
Dr Jones
Guest
Posts: n/a
 
      24th May 2006

No as in I want to align 1 up with 1 and 5 with 5 etc, one column ha
consecutive numbers and I want to align the other column with th
consecutive numbers. At the moment I've gone through and inserted row
until it lines up but this is very time consuming.

I have a column of numbers in a random format that I want to alig
against the numbers in another column. Not all numbers are present al
the time

--
Dr Jone
-----------------------------------------------------------------------
Dr Jones's Profile: http://www.excelforum.com/member.php...fo&userid=3474
View this thread: http://www.excelforum.com/showthread.php?threadid=54508

 
Reply With Quote
 
Puppet_Sock
Guest
Posts: n/a
 
      24th May 2006
Dr Jones wrote:
[snip]
> Basically I have this data for example formatted like this
> A B C
> 1 1 2 SAMPLE1
> 2 2 5 SAMPLE2
> 3 3 6 SAMPLE3
> 4 4
> 5 5
> 6 6
>
> I want to be able to align Column B's numbers with those in A and take
> C along for the ride.


Ok, the sample data you gave looked like so.

A B C
1 1 2 SAMPLE1
2 2 5 SAMPLE2
3 3 6 SAMPLE3
4 4
5 5
6 6

I'm *guessing* you meant it to look like so.

A B C
1 2 SAMPLE1
2 5 SAMPLE2
3 6 SAMPLE3
4
5
6

That is, the first column of 1, 2, etc. is really the row numbers.

And I'm also *guessing* (from reading downthread) you want to
know how to get it to look like so.

A B C
1
2 2 SAMPLE1
3
4
5 5 SAMPLE2
6 6 SAMPLE3

If that's it, and if I were doing it, I would be writing some VBA to do
it.
The steps would look like so:
- Move cols B and C to a temp worksheet, still in cols B and C.
(Saves having to worry about moving and copying onto places
that may have data already.)
- Sort cols B and C on col B.
- Check for duplicates in col B. Check for values out of range in col
B.
Decide what to do if these conditions appear.
- Scan down col A here and col B on the temp sheet. Keep a pointer
to each. When the value is the same, copy from B&C on the temp
to here, and step both. If B is ahead, then step A till they are the
same.
If A is ahead, there's an error someplace.
- Clean up the temp sheet, either deleting it or just clearing it and
leaving
it for the next run.

Attach this to a butto and that should be about it.
Socks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I seperate a full name field out into three seperate columns? Rod Microsoft Excel Worksheet Functions 3 31st Oct 2006 08:06 PM
seperate first 2 lines of column in seperate columns in same row =?Utf-8?B?R2x5bm5oYW1lcg==?= Microsoft Excel Misc 2 9th Oct 2006 04:23 AM
aligning two columns mikkellund Microsoft Excel Worksheet Functions 1 7th Jul 2005 01:33 AM
How to find duplicate numbers in seperate columns mosborne Microsoft Excel Worksheet Functions 1 16th Jul 2004 02:53 PM
aligning columns Leslie Taylor Microsoft Word Document Management 3 28th Sep 2003 11:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:45 AM.