Macro to copy a certain cell onto another row
Solved/Closed
DesertMoon20
Posts
7
Registration date
Wednesday 14 July 2010
Status
Member
Last seen
22 September 2010
-
14 Jul 2010 à 17:19
DesertMoon20 Posts 7 Registration date Wednesday 14 July 2010 Status Member Last seen 22 September 2010 - 19 Jul 2010 à 08:57
DesertMoon20 Posts 7 Registration date Wednesday 14 July 2010 Status Member Last seen 22 September 2010 - 19 Jul 2010 à 08:57
Related:
- Macro to copy a certain cell onto another row
- Saints row 2 cheats - Guide
- How to delete a row in word - Guide
- How to copy macro from one workbook to another - Guide
- How to run a macro in excel - Guide
- Run Macros in Excel: online, shortcuts, VBA - Guide
3 responses
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
18 Jul 2010 à 09:17
18 Jul 2010 à 09:17
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 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
14 Jul 2010 à 19:02
14 Jul 2010 à 19:02
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 14 July 2010
Status
Member
Last seen
22 September 2010
14 Jul 2010 à 20:06
14 Jul 2010 à 20:06
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 14 July 2010
Status
Member
Last seen
22 September 2010
14 Jul 2010 à 17:21
14 Jul 2010 à 17:21
Column A is originally blank.
19 Jul 2010 à 08:57
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