Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 25th, 2004, 09:08 AM
Authorized User
 
Join Date: Oct 2004
Location: Edinburgh, Scotland, United Kingdom.
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to SiliconFuRy
Default Row by Row

I have a spreadsheet with several columns(A thru H) and a couple of thousand rows, and certain rows have one or more cells with a background color of red.

What I'd like to do is to do a for each in every cell in every row, check its background color, if its red, then copy the ENTIRE row into another worksheet, not necessarily the same row number (ie, if it was row 799, and there are currently 3 rows in the new table, then copy row 799 from the old to row 4 in the new).

Another slight problem is that the cells both contain forumalas and static values (the formulas being vlookups).

I'm guessing I'd do..

For Each myCell in mySheet.Range("A:H").SpecialCells(xlCellTypeAllFor matConditions)

If any 1 cell in row has bgcolor = red Then
' copy this row from ActiveSheet to NewSheet
' go to next row
End If
Next

Any takers?
__________________
Many shoes,

Jamez/SiliconFuRy
Reply With Quote
  #2 (permalink)  
Old October 25th, 2004, 09:20 AM
Authorized User
 
Join Date: Oct 2004
Location: Edinburgh, Scotland, United Kingdom.
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to SiliconFuRy
Default

*Waits to be hit over the head with a large Excel manual*

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrollbar in row of Datagrid Except Header Row Theone84 ASP.NET 2.0 Professional 0 August 11th, 2008 12:10 AM
To retrieve a row by giving row number prad_a MySQL 1 March 22nd, 2007 11:20 PM
Read a column and Search Row by Row in another col AyatKh Excel VBA 2 January 26th, 2005 12:02 PM
Row blinking or Row Red mateenmohd Classic ASP Basics 4 January 26th, 2005 05:40 AM
Manage data row by row in datagrid Dragonist Classic ASP Databases 5 July 29th, 2004 04:17 AM



All times are GMT -4. The time now is 04:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.