Thread: sort by colour
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default sort by colour

Thanks Dave


Gord

On Thu, 25 Mar 2010 09:44:47 -0500, Dave Peterson
wrote:

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 he
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" wrote:

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 Dibben wrote:
=Personal.xls!getcolour(range)

Gord

Hi

[quoted text clipped - 19 lines]

thanks


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/201003/1