Automate The Process
Closed
Avy
-
17 Sep 2010 à 02:52
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 17 Oct 2010 à 13:03
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 17 Oct 2010 à 13:03
Related:
- Automate The Process
- Mouso core worker process - Guide
- Wsappx process - Guide
- Windows validation process - Guide
- Ftp process - Guide
- Flipkart return process - Guide
5 responses
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
19 Sep 2010 à 07:56
19 Sep 2010 à 07:56
Could you please upload a sample EXCEL file WITH sample data, macro, formula , conditional formatting etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , http://www.editgrid.com etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
Hi,
What Im trying to do is like this:
data1
blank cell
blank cell
data2
blank cell
blank cell
blank cell
data3
blank cell
output should be
data1
data1
data1
data2
data2
data2
data2
data3
data3
it will just copy the data on the next blank cell(downward). after it paste the data1 it will proceed to data2 and so on.
This is what Im trying to do. I have no idea how to put this on loop.
Thanks
What Im trying to do is like this:
data1
blank cell
blank cell
data2
blank cell
blank cell
blank cell
data3
blank cell
output should be
data1
data1
data1
data2
data2
data2
data2
data3
data3
it will just copy the data on the next blank cell(downward). after it paste the data1 it will proceed to data2 and so on.
This is what Im trying to do. I have no idea how to put this on loop.
Thanks
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
20 Sep 2010 à 08:47
20 Sep 2010 à 08:47
if all you want to do is fill in the missing value with the last value, then you can try this
Dim lRow As Long
Dim lLastRow As Long
Dim lLastRow As Long
lLastRow = Cells(Rows.Count, "C").End(xlUp).Row
If (Cells(Rows.Count, "C") <> vbNullString) Then lLastRow = Rows.Count
lLastRow = 1
For lRow = 1 To lLastRow
If Cells(lRow, "C") <> Cells(lLastRow, "C") _
Then
lLastRow = lRow
ElseIf (Cells(lRow, "C") = vbNullString) _
Then
Cells(lRow, "C") = Cells(lLastRow, "C")
End If
Next lRow
Having errors in putting the copy and paste command. Where should I put it in the Loop?
I put the copy command in the first if loop. the trouble is in the paste thing.
Thanks
/////if all you want to do is fill in the missing value with the last value, then you can try this
Dim lRow As Long
Dim lLastRow As Long
Dim lLastRow As Long
lLastRow = Cells(Rows.Count, "C").End(xlUp).Row
If (Cells(Rows.Count, "C") <> vbNullString) Then lLastRow = Rows.Count
lLastRow = 1
For lRow = 1 To lLastRow
If Cells(lRow, "C") <> Cells(lLastRow, "C") _
Then
lLastRow = lRow
ElseIf (Cells(lRow, "C") = vbNullString) _
Then
Cells(lRow, "C") = Cells(lLastRow, "C")
End If
Next lRow
I put the copy command in the first if loop. the trouble is in the paste thing.
Thanks
/////if all you want to do is fill in the missing value with the last value, then you can try this
Dim lRow As Long
Dim lLastRow As Long
Dim lLastRow As Long
lLastRow = Cells(Rows.Count, "C").End(xlUp).Row
If (Cells(Rows.Count, "C") <> vbNullString) Then lLastRow = Rows.Count
lLastRow = 1
For lRow = 1 To lLastRow
If Cells(lRow, "C") <> Cells(lLastRow, "C") _
Then
lLastRow = lRow
ElseIf (Cells(lRow, "C") = vbNullString) _
Then
Cells(lRow, "C") = Cells(lLastRow, "C")
End If
Next lRow
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
21 Sep 2010 à 01:54
21 Sep 2010 à 01:54
what error?
here is the full routine
here is the full routine
Sub ReplicateCell()
Dim lRow As Long
Dim lLastRow As Long
Dim lMaxRow As Long
Dim Cell As Range
Set Cell = Cells.Find("*", Cells(1, 1), , , xlByRows, xlPrevious)
If Cell Is Nothing Then Exit Sub
lMaxRow = Cell.Row
Set Cell = Nothing
lLastRow = 1
For lRow = 1 To lMaxRow
If (Cells(lRow, "C") = vbNullString) _
Then
Cells(lRow, "C") = Cells(lLastRow, "C")
ElseIf Cells(lRow, "C") <> Cells(lLastRow, "C") _
Then
lLastRow = lRow
End If
Next lRow
End Sub
sorry for late reply.
Im talking about the copy and paste routine, Where will I insert it?
Thanks
Im talking about the copy and paste routine, Where will I insert it?
Thanks
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
17 Oct 2010 à 13:03
17 Oct 2010 à 13:03
that was supposed to replace your existing code. if my memory serves me for a change, you had a routine by that name