Automate The Process
Closed
Avy
-
Sep 17, 2010 at 02:52 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Oct 17, 2010 at 01:03 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Oct 17, 2010 at 01:03 PM
Related:
- Automate The Process
- Mouso core worker process - Guide
- Process terminator - Download - Cleaning and optimization
- Checkr background check process - Guide
- Ftp process - Guide
- Windows validation process - Guide
5 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Sep 19, 2010 at 07:56 AM
Sep 19, 2010 at 07:56 AM
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 January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Sep 20, 2010 at 08:47 AM
Sep 20, 2010 at 08:47 AM
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 January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Sep 21, 2010 at 01:54 AM
Sep 21, 2010 at 01:54 AM
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
Didn't find the answer you are looking for?
Ask a question
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 January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Oct 17, 2010 at 01:03 PM
Oct 17, 2010 at 01:03 PM
that was supposed to replace your existing code. if my memory serves me for a change, you had a routine by that name