coba pakai VBA yah untuk menjawab.

maap kalo kurang slim VBA nya, maklum baru belajar :)
File .xlsm nya attached.

'belajar VBA
'wira
'25 may 2013

Sub oil()

Dim cell As Range
Dim counter As Integer
Dim lastrow As Long

lastrow = Range("C65536").End(xlUp).Row

Range("C2:C" & lastrow).Select

For Each cell In Selection
    If cell.Value = "OIL SAMPLE" Then
    cell.Offset(0, 2).Formula = 1
End If
Next cell

'helper
counter = 0

Range("E2:E" & lastrow).Select
For Each cell In Selection
    If cell.Offset(0, -2).Value = "OIL SAMPLE" And cell.Offset(-1, 0).Value
= "" And cell.Value = 1 Then
        cell.Offset(0, 1).Formula = cell.Value + counter
        counter = counter + 1
    End If
Next cell

Range("F2:F" & lastrow).Select
For Each cell In Selection
    If cell.Value = "" Then
        If cell.Offset(0, -1) <> "" Then cell.Value = cell.Offset(-1,
0).Value
    End If
Next cell

Range("F2: F" & lastrow).Copy
Range("B2").PasteSpecial xlPasteValues

'remove helper
Range("E2: F" & lastrow).ClearContents

Range("B2").Select

End Sub



regards, wira


2013/5/25 A. Zainal H. <a_zainal_hi...@yahoo.com>

> **
>
>
> Dear Be-Exceller
>
> Mohon bantuannya untuk problem pada file terlampir
> Trims all
>
> Wassalam
>
> *A. Zainal H*
>
>  
>

Attachment: Copy of nmr urut-2.xlsm
Description: Binary data

Kirim email ke