Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Sub RemoveMiddleData()
'function to remove the middle data of the graph
Dim intXFirstRow, intXLastRow As Integer
Dim IntCntofRows As Integer
Dim rwIndex As Integer
Dim intCeiling As Integer
Dim strStrip
Dim lrows As Long
intCeiling = 100 'maximum number of rows change to whatever you like
lrows = Sheet1.Rows.Count
For I = 1 To lrows - 1
If Trim(Sheet1.Cells(I + 1, 1).Value) = "" Then Exit For
Next I
lrows = I
If lrows > intCeiling Then
intXFirstRow = Round(lrows / 3, 0)
intXLastRow = lrows - (intXFirstRow)
While intXFirstRow + (intXran - intXLastRow) > intCeiling
intXFirstRow = intXFirstRow - 1
intXLastRow = intXLastRow + 1
Wend
IntCntofRows = intXFirstRow
strStrip = intXFirstRow & ":" & intXLastRow
Sheet1.Range(strStrip).EntireRow.Hidden = True ' hide or delete rows
End If
End Sub
Public Sub RandomlyRemoveData()
Dim lrows
Dim intStart
Dim intTarget
intTarget = 60 ' number of rows you want to reduce your data down to
lrows = Sheet1.Rows.Count
For I = 1 To lrows - 1
If Trim(Sheet1.Cells(I + 1, 1).Value) = "" Then Exit For
Next I
lrows = I
intStart = 1
While lrows > intTarget
Randomize
If Int((3 * Rnd) + 1) = 1 Then
Sheet1.Rows(intStart).Delete
lrows = lrows - 1
End If
intStart = Round(((lrows * Rnd) + 1))
Wend
End Sub