Page 1 of 1

Excel help

PostPosted: Mon Jan 11, 2010 3:55 am
by PadawanLotto
Is it possible to divide 2 numbers and round the result in the same cell?

Never mind, I found the solution at MrExcel.com.

Thanks anyway.

Re: Excel help

PostPosted: Sun Jul 11, 2010 2:21 pm
by PadawanLotto
Ok, new question and Mr, Excel was no help. Can you sort numbers in a row of cells? Example: 48391 each number in it's own cell sorted numerically 13489.
I tried the Sort left to right by row on values order smallest to largest and it sorts one row but not the other rows.

Thanks
Padawan

Re: Excel help

PostPosted: Mon Jul 12, 2010 4:07 am
by Bobijohn
Hi PadwanLotto

You may find the attached text file helpful. I copied this to myself several years ago and used it extensively in Excel 2003.

Pay particular attention to to the last main paragraph to do multiple rows using the "small" function.

Ofcourse, credit to the original poster.

Cheers

Re: Excel help

PostPosted: Mon Jul 12, 2010 4:30 am
by PadawanLotto
Thanks Bobijohn, I'll give it shot.

Re: Excel help

PostPosted: Mon Jul 12, 2010 12:20 pm
by Mallard
Are you trying sort each row individually from left to right?

If so, you would need a macro to do it or do each row manually one at a time.

Hi Padawanlotto
Are you trying sort each row individually from left to right?
If so, you would need a macro to do it or do each row manually one at a time.


this worked for me:
Just create your own Macro as follows .............

Sub sortData()
Dim r As Range, cell As Range, r1 As Range
Set r = Range(Cells(1, 1), Cells(Rows.Count, 1).End(xlUp))
For Each cell In r
Set r1 = cell.Resize(1, 6)
r1.Sort Key1:=r1, _
Order1:=xlAscending, _
Orientation:=xlSortRows
Next
End Sub

this assumes your data starts in A1.

Re: Excel help

PostPosted: Mon Jul 12, 2010 12:31 pm
by PadawanLotto
Thanks Mallard, I'll give that a shot also. I haven't tried the first suggestion yet, I sort of did a work around where I didn't need to sort the numbers in order any more. I'll put this in my book of Excel notes though, funny thing is I haven't worked with excel for awhile and forgot how to do a lot things. In my younger days my math instructor wanted me to take algebra, he said I'd be good at it, I asked what was it good for what can it be applied to? He had no idea so, I didn't take any classes. Now Excel learning algebra on the fly. :D

Thanks again

Padawan

Re: Excel help

PostPosted: Tue Jul 13, 2010 11:12 am
by PadawanLotto
Mallard wrote:Are you trying sort each row individually from left to right?

If so, you would need a macro to do it or do each row manually one at a time.

Hi Padawanlotto
Are you trying sort each row individually from left to right?
If so, you would need a macro to do it or do each row manually one at a time.


this worked for me:
Just create your own Macro as follows .............

Sub sortData()
Dim r As Range, cell As Range, r1 As Range
Set r = Range(Cells(1, 1), Cells(Rows.Count, 1).End(xlUp))
For Each cell In r
Set r1 = cell.Resize(1, 6)
r1.Sort Key1:=r1, _
Order1:=xlAscending, _
Orientation:=xlSortRows
Next
End Sub

this assumes your data starts in A1.

Nice, worked great, no mus no fus. Thanks Mallard

Re: Excel help

PostPosted: Tue Jul 13, 2010 8:02 pm
by PadawanLotto
Bobijohn wrote:Hi PadwanLotto

You may find the attached text file helpful. I copied this to myself several years ago and used it extensively in Excel 2003.

Pay particular attention to to the last main paragraph to do multiple rows using the "small" function.

Ofcourse, credit to the original poster.

Cheers

Thanks Bobijohn, I like this better than the macro because of the speed and I think it would be a lot safer to use than a macro.

Re: Excel help

PostPosted: Tue Jul 13, 2010 11:08 pm
by Bobijohn
Hi Padawanlotto

Yep - it is pretty slick once you get the hang of it. Although, if you are building a permanent spreadsheet it is probably better to use the macro approach and build it in.

Anyway, glad to be of help and, BTW, thanks for all your excellent posts and contribution to this forum over the years.

Bobijohn

Re: Excel help

PostPosted: Mon Aug 02, 2010 10:49 pm
by PadawanLotto
New challenge, is it possible to find and count the duplicates in a list of numbers?
I have a list of 376,992 5 digit numbers that contain duplicates in sets of 6, 21, and 56. I want to find those sets without doing it manually. I have already found the unique numbers, there are 91,713.

Thanks
Padawan