Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
If the characters in the cells are truly two single quotes, try this: Dim lX As Long Dim rCell As Range For Each rCell In ActiveSheet.UsedRange.Columns(1).Rows If rCell.FormulaR1C1 = "''" Then rCell.Value = rCell.Offset(-1, 0).Value rCell.Offset(0, 1).Value = rCell.Offset(-1, 1).Value End If Next rCell If the characters are actually double quotes, try this: Dim lX As Long Dim rCell As Range For Each rCell In ActiveSheet.UsedRange.Columns(1).Rows 'If rCell.FormulaR1C1 = """" Then MsgBox "got it " & rCell.Address If rCell.FormulaR1C1 = "''" Then rCell.Value = rCell.Offset(-1, 0).Value rCell.Offset(0, 1).Value = rCell.Offset(-1, 1).Value End If Next rCell HTH "Koen" wrote: Hi, I'm looking for a solution for the following problem: I have data in more or less the following form: A B 1/1/08 Alex " " " " 13/1/08 Sarah " " " " The apostrophes meaning that this cell has the same entry as the one above So what I want to have is my data in the following form: A B 1/1/08 Alex 1/1/08 Alex 1/1/08 Alex 13/1/08 Sarah 13/1/08 Sarah 13/1/08 Sarah I used the code like in the following thread: http://www.microsoft.com/communities...=en-us&m=1&p=1 It works fine for all symboles except for the apostrophe, because it has some sort of function in VBA (don't know, because I cannot program in VBA) Can anyone help me, or do I have to use a different symbol? Thanks in advance, Koen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Find and Replace isn't working on apostrophe within cell value | Excel Programming | |||
Find/Replace Unshown Apostrophe | Excel Programming | |||
Replace all values in a column with values using a mapping from another worksheet | Excel Programming | |||
FIND and REPLACE ' apostrophe | Excel Discussion (Misc queries) | |||
Remove the apostrophe (') in Excel cell text values | Excel Discussion (Misc queries) |