sort by colour

  • Thread starter BNT1 via OfficeKB.com
  • Start date
B

BNT1 via OfficeKB.com

Hi

Is it possible to sort by colour, with using an Add-in, as I am at work and
will not permit any install

tried the links to cpearson etc, but i see they were add-ins

glad to use any VBA, if anyone has it, of point me in the direction?
using Excel 2003

thanks
 
B

BNT1 via OfficeKB.com

Hi

Works perfect when copy/paste in module this workbook.

When copy/paste in personal.xls vba it doesnt seem to work

Function getcolour(mycell As Range)
getcolour = mycell.Interior.ColorIndex
End Function

Am i doing something wrong?

regards
thank you both - did use the datapig as i was able to follow it easier
works perfect
regards
Follow this
[quoted text clipped - 5 lines]
 
G

Gord Dibben

=Personal.xls!getcolour(range)


Gord


Hi

Works perfect when copy/paste in module this workbook.

When copy/paste in personal.xls vba it doesnt seem to work

Function getcolour(mycell As Range)
getcolour = mycell.Interior.ColorIndex
End Function

Am i doing something wrong?

regards
thank you both - did use the datapig as i was able to follow it easier
works perfect
regards
Follow this
[quoted text clipped - 5 lines]
 
B

BNT1 via OfficeKB.com

thanks Gord

where do i paste this "=Personal.xls!getcolour(range)"
in the code below (as you may of guessed, i'm upto spped with this VBa

Function getcolour(mycell As Range)
getcolour = mycell.Interior.ColorIndex
End Function

Have tried:
Function Personalxls!getcolour(mycell as range)
getcolour = mycell.Interior.ColorIndex
End Function

but got error

thanks in advance


Gord said:
=Personal.xls!getcolour(range)

Gord
[quoted text clipped - 19 lines]
 
D

Dave Peterson

You type Gord's suggestion into a cell in the worksheet.

For instance, to get the interior colorindex of the cell in A1, you could type
this into B1:

=Personal.xls!getcolour(A1)

=====
The code itself would go into a general module of the personal.xls workbook's
project.

I'm not sure if you put that in the correct location, though.

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

BNT1 via OfficeKB.com said:
thanks Gord

where do i paste this "=Personal.xls!getcolour(range)"
in the code below (as you may of guessed, i'm upto spped with this VBa

Function getcolour(mycell As Range)
getcolour = mycell.Interior.ColorIndex
End Function

Have tried:
Function Personalxls!getcolour(mycell as range)
getcolour = mycell.Interior.ColorIndex
End Function

but got error

thanks in advance

Gord said:
=Personal.xls!getcolour(range)

Gord
[quoted text clipped - 19 lines]
 
B

BNT1 via OfficeKB.com

worked a treat

Dave said:
You type Gord's suggestion into a cell in the worksheet.

For instance, to get the interior colorindex of the cell in A1, you could type
this into B1:

=Personal.xls!getcolour(A1)

=====
The code itself would go into a general module of the personal.xls workbook's
project.

I'm not sure if you put that in the correct location, though.

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)
thanks Gord
[quoted text clipped - 27 lines]
 
G

Gord Dibben

Thanks Dave


Gord

You type Gord's suggestion into a cell in the worksheet.

For instance, to get the interior colorindex of the cell in A1, you could type
this into B1:

=Personal.xls!getcolour(A1)

=====
The code itself would go into a general module of the personal.xls workbook's
project.

I'm not sure if you put that in the correct location, though.

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

BNT1 via OfficeKB.com said:
thanks Gord

where do i paste this "=Personal.xls!getcolour(range)"
in the code below (as you may of guessed, i'm upto spped with this VBa

Function getcolour(mycell As Range)
getcolour = mycell.Interior.ColorIndex
End Function

Have tried:
Function Personalxls!getcolour(mycell as range)
getcolour = mycell.Interior.ColorIndex
End Function

but got error

thanks in advance

Gord said:
=Personal.xls!getcolour(range)

Gord

Hi

[quoted text clipped - 19 lines]

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top