![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | Blogs | Mark Forums Read |
| Microsoft Applications Discussions about Windows and other MS Products such as Office |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | i need to write a visual basic program to perform the analysis of Excel price list to analyze the line and column headings and copy them along with the prices into a sheet . the program should react to the colors as shown . selection of fields from Excel based on color and outputting the selected fields to new excel sheet ***** Posted via: http://www.ozgrid.com Excel Templates, Training & Add-ins. Free Excel Forum http://www.ozgrid.com/forum ***** |
|
| | #2 (permalink) |
| Civilians | If you record a macro when you change the color, then you'll know what property your code will have to inspect. Then you can do things like: Option Explicit Sub testme01() Dim myHeaderRng As Range Dim myCell As Range Dim RngToCopy As Range Dim DestCell As Range With ActiveSheet Set myHeaderRng = .Range("a1:e1") For Each myCell In myHeaderRng.Cells If myCell.Interior.ColorIndex = 6 Then Set RngToCopy _ = .Range(myCell, .Cells(.Rows.Count, myCell.Column).End(xlUp)) With Worksheets("Othersheetnamehere") Set DestCell _ = .Cells(1, .Columns.Count).End(xlToLeft).Offset(0, 1) End With RngToCopy.Copy _ Destination:=DestCell End If Next myCell End With End Sub Maybe this'll get you started. uday wrote: > > i need to write a visual basic program to perform the analysis of Excel > price list to analyze the line and column headings and copy them along > with the prices into a sheet . the program should react to the colors as > shown . > > selection of fields from Excel based on color and outputting the > selected fields to new excel sheet > > ***** Posted via: http://www.ozgrid.com > Excel Templates, Training & Add-ins. > Free Excel Forum http://www.ozgrid.com/forum ***** -- Dave Peterson ec35720@msn.com |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to get the number of days between two date formatted fields in vba for excel? | Daniel | Microsoft Applications | 1 | 07-12-2005 00:00 |
| Link with Excel and updating fields | =?Utf-8?B?UGFub3M=?= | Microsoft Applications | 2 | 11-23-2004 16:00 |
| HELP: Access table linked to Excel - calculated fields? | K Zox | Microsoft Applications | 3 | 11-12-2004 08:00 |
| Analyze Timescale Data in Excel - available fields | Verosa | Microsoft Applications | 4 | 06-16-2004 17:58 |
| Export Data and populate existing Excel Spreadsheet Fields | Wesley H | Microsoft Applications | 3 | 06-16-2004 01:09 |
![]() | ![]() | ![]() |