• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Customize Repot

marreco

Member
I have report data then i need "CRM" in column, look my file
 

Attachments

  • Report.xlsb
    11.8 KB · Views: 11
try:
Code:
Sub blah()
With Columns(2)
  Set c = .Find("DATA ENTRADA", LookIn:=xlValues, lookat:=xlPart, searchformat:=False)
  If Not c Is Nothing Then
    firstAddress = c.Address
    Do
      Range(c.Offset(1, -1), Cells(c.End(xlDown).Row, 1)).FormulaR1C1 = "=R" & c.Row - 1 & "C2"
      Set c = .FindNext(c)
    Loop While Not c Is Nothing And c.Address <> firstAddress
  End If
End With
End Sub
 
I've just realised that this leaves the formulae on the sheet, to convert the formulae to hard values:
Code:
Sub blah()
With Columns(2)
  Set c = .Find("DATA ENTRADA", LookIn:=xlValues, lookat:=xlPart, searchformat:=False)
  If Not c Is Nothing Then
    firstAddress = c.Address
    Do
      With Range(c.Offset(1, -1), Cells(c.End(xlDown).Row, 1))
        .FormulaR1C1 = "=R" & c.Row - 1 & "C2"
        .Value = .Value
      End With
      Set c = .FindNext(c)
    Loop While Not c Is Nothing And c.Address <> firstAddress
  End If
End With
End Sub
 
Back
Top