LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Code deleting values -- not as intended

I pass to this sub:

Public Sub FormatWorksheetForAccess(ws As Worksheet)

Dim C As Range, rng As Range, j As Long

With ws
.Unprotect
.Columns("K:L").ColumnWidth = 5
'differentiate between the two % columns. Rename one.
.Range("L1").Value = "%ge"
'before deleting duplicate Field Name rows, place a marker in col A.
For Each C In .Range("A2", "A" & .Range("N65536").End(xlUp).Row)
If C.Value = "Item" Then
C.EntireRow.ClearContents
C.Value = "#"
etc.

It appears that if 'Item' is in "A1" then that row is deleted.
So my For Each statement is failing?

Any help much appreciated


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.674 / Virus Database: 436 - Release Date: 02/05/2004


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting Not Working As Intended Bishop Excel Worksheet Functions 3 February 5th 10 08:51 PM
Excel 2003 worksheet duplication -not intended Joan Excel Worksheet Functions 2 December 17th 07 04:10 PM
Limit Macro to Intended worksheet. Quin Excel Worksheet Functions 2 March 2nd 07 02:49 AM
deleting values in a worksheet without deleting the formulas patti Excel Worksheet Functions 1 October 28th 05 09:49 PM
Deleting code in a file with code.. KimberlyC Excel Programming 3 March 4th 04 09:24 PM


All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"