Y
Yeshwin
Hi All,
I have a worksheet with data in it. Based on the data also have a chart on
the same sheet plotted by rows. Using the macro below I am deleting rows
containing value color.
Dim r As Range
Dim lastRow As Long
Dim i As Long
Set r = ActiveSheet.UsedRange
lastRow = r.Rows(r.Rows.Count).Row
For i = lastRow To 3 Step -1
If InStr(1, Cells(i, 2), "Color", vbTextCompare) = 1 Then
Rows(i).Delete
End If
Next
ActiveSheet.UsedRange.Select
End Sub
Since I have the chart plotted by rows (Actually it should not matter wether
the chart is plotted by rows or by columns) I want to write a macro or
modify the macro I have above in a way that it assigns new range as a
source data for the chart.
Please help me
Yesh.
I have a worksheet with data in it. Based on the data also have a chart on
the same sheet plotted by rows. Using the macro below I am deleting rows
containing value color.
Dim r As Range
Dim lastRow As Long
Dim i As Long
Set r = ActiveSheet.UsedRange
lastRow = r.Rows(r.Rows.Count).Row
For i = lastRow To 3 Step -1
If InStr(1, Cells(i, 2), "Color", vbTextCompare) = 1 Then
Rows(i).Delete
End If
Next
ActiveSheet.UsedRange.Select
End Sub
Since I have the chart plotted by rows (Actually it should not matter wether
the chart is plotted by rows or by columns) I want to write a macro or
modify the macro I have above in a way that it assigns new range as a
source data for the chart.
Please help me
Yesh.