Macro to copy a certain cell onto another row
Solved/Closed
DesertMoon20
Posts
7
Registration date
Wednesday July 14, 2010
Status
Member
Last seen
September 22, 2010
-
Jul 14, 2010 at 05:19 PM
DesertMoon20 Posts 7 Registration date Wednesday July 14, 2010 Status Member Last seen September 22, 2010 - Jul 19, 2010 at 08:57 AM
DesertMoon20 Posts 7 Registration date Wednesday July 14, 2010 Status Member Last seen September 22, 2010 - Jul 19, 2010 at 08:57 AM
Related:
- Macro to copy a certain cell onto another row
- Saints row 2 cheats - Guide
- How to delete a row in word - Guide
- Excel online macro - Guide
- Excel run macro on open - Guide
- How to copy macro from one workbook to another - Guide
3 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 18, 2010 at 09:17 AM
Jul 18, 2010 at 09:17 AM
Try this
Sub FixData()
Dim sTgtSht As String
Dim lMaxRows As Long
Dim lRow As Long
Dim sLastEmp As String
sTgtSht = "Sample"
Sheets(sTgtSht).Select
lMaxRows = Cells(Rows.Count, "B").End(xlUp).Row
For lRow = 2 To lMaxRows
If (Cells(lRow, "B") = "") Then GoTo Next_lRow
If (Left(Cells(lRow, "B"), 2) = "E#") Then
sLastEmp = Cells(lRow, "B")
Else
Cells(lRow, "A") = sLastEmp
End If
Next_lRow:
Next lRow
End Sub
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 14, 2010 at 07:02 PM
Jul 14, 2010 at 07:02 PM
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
DesertMoon20
Posts
7
Registration date
Wednesday July 14, 2010
Status
Member
Last seen
September 22, 2010
Jul 14, 2010 at 08:06 PM
Jul 14, 2010 at 08:06 PM
Thanks for replying, rizviza1... The first sheet shows the sample and the second sheet shows how I would like it to show, here is the link:
https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/1-rCNkOXX-eJ2cespFthx9lzDsFDoWQme70vtldAn7UA/edit?authkey%3DCNbs3Z4M%26hl%3Den%26hl%3Den%26authkey%3DCNbs3Z4M&followup=https://docs.google.com/spreadsheets/d/1-rCNkOXX-eJ2cespFthx9lzDsFDoWQme70vtldAn7UA/edit?authkey%3DCNbs3Z4M%26hl%3Den%26hl%3Den%26authkey%3DCNbs3Z4M<mpl=sheets&hl=en
Thanks
https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/1-rCNkOXX-eJ2cespFthx9lzDsFDoWQme70vtldAn7UA/edit?authkey%3DCNbs3Z4M%26hl%3Den%26hl%3Den%26authkey%3DCNbs3Z4M&followup=https://docs.google.com/spreadsheets/d/1-rCNkOXX-eJ2cespFthx9lzDsFDoWQme70vtldAn7UA/edit?authkey%3DCNbs3Z4M%26hl%3Den%26hl%3Den%26authkey%3DCNbs3Z4M<mpl=sheets&hl=en
Thanks
DesertMoon20
Posts
7
Registration date
Wednesday July 14, 2010
Status
Member
Last seen
September 22, 2010
Jul 14, 2010 at 05:21 PM
Jul 14, 2010 at 05:21 PM
Column A is originally blank.
Jul 19, 2010 at 08:57 AM
The spreadsheet can be found here: https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/1-rCNkOXX-eJ2cespFthx9lzDsFDoWQme70vtldAn7UA/edit?authkey%3DCNbs3Z4M%26hl%3Den%26hl%3Den%26authkey%3DCNbs3Z4M&followup=https://docs.google.com/spreadsheets/d/1-rCNkOXX-eJ2cespFthx9lzDsFDoWQme70vtldAn7UA/edit?authkey%3DCNbs3Z4M%26hl%3Den%26hl%3Den%26authkey%3DCNbs3Z4M<mpl=sheets&hl=en