Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm brand new to macros and coding in general. I've sifted through this site for an answer, but there was no one post to cover what I needed, so I pieced this baby together from different posts. I will be getting these excel files frequently, and they can contain thousands of rows. I need a macro that will search all rows and columns in the active worksheet of any workbook I may choose, regardless of how many rows it contains. I need to replace each cell that contains only a single " mark with the contents of the cell above it (somebody thinks it's a good idea to use ditto marks in their database). There is legitimate use of quotes elsewhere in the worksheet Dim r As Range Set r = ActiveSheet.UsedRange r.Replace What:=""", Replacement:=MyCell.Value = ActiveCell.FormulaR1C1 = "=R[-1]C", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False End Sub This will not run. But you could probably tell that from reading it, huh? It says there's a syntax error, but I think it's more than that. p.s. I did read a post with a warning that worried me. I can't remember the exact warning, but it was something about not using a whole worksheet as a range because the code would remember the amount of rows used each time you ran it and adjust the code to reflect that. The post said it was better to name a specific range, but I want to be able to run this code no matter how many rows. Is that post true? PLEASE HELP ME! Thanx jen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |