![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 1
|
I have an excel spreadsheet with entire rows marks with different color's. Depending upon the row color I want to populate a new column.
ie if the row color is Red then the column value should be say 'R' |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Quote:
To use this, you first must paste it in to a module. ALT+F11 will open the Visual Basic Editor window. You then need to select the file you want to paste the code in. You can select the file in the Project Explorer window (you'll see your open files in this window. It looks similar to Windows Explorer) and select Insert|Module. This will open a new module window. Paste the code in that window. To use the formula, the syntax is: =BookName.xls!Color_Index(A1) where "BookName" is the name of the file you pasted the code in. Note - this will return an error if you select more than one cell. Regards,
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|