vba - AUTOFILL IN EXCEL MACRO -
I am trying to use a macro recorder in Excel to record a macro to fill a column of cells Each time there is a different number of cells which are either too short or too long and it appears that because the macro identifies the cell range and it is fixed.
I need Auto or Auto filling from below:
ActiveCell.FormulaR1C1 = "= CONCATENATE (RC [1]," "", RC [2] Select "Range" ("C1"). AutoFill Destination: = ActiveCell.Range ("A1: A261") ActiveCell.Range ("A1: A261"). < P> File is not always 261 why? Why can I keep a command to select / auto fill the last column? Blockquote
sub WMEHOT_Cleaner () '' WMEHOT_Cleaner Macro '' column ( "a: a") .: = xlToRight, CopyOrigin: = xlFormatFromLeftOrAbove Selection.Insert shift: = xlToRight, CopyOrigin: = xl FormatFromLeftOrAbove column (Select to Selection.Cut column "L") SelectionkInsert shift ( "B.: B Select"). ActiveSheetkPaste Select column ( "C: C"). Select Krenkkut range Select the ActiveSheet.Paste range ("C1"). Select ActiveCell.FormulaR1C1 = "= CONCATENATE [1]," "", RC [2]) "range (" C1 ") . Select the selection. Autofill destination: = actively. Ranges ("A1: A261") ActiveCell.Range ("A1: A261"). Select range ("C1") Select Select range (Selection, Selection.End (xlDown)) Selection.Copy Selection.End (xlUp). Selection Selection.Paste Special Paste: .. = XlPasteValues, Operation: = xlNone, SkipBlanks _: = False, Transjections: = Falls Application.Cutcopy Mode = Wrong column ("D: E"). Choose. Clear Content Range ("D1"). Choose active seals. Forum "RC [1] [6])" range ("D1"). Select the selection. Autofill destination: = actively. Ranges ("A1: A261") Activivel. Ranges ("A1: A261"). Select Activisel. Select Range (Select, Select. Select the end (xlDown)) to Selection.Copy Selection.End (xlUp) .Select Selection.PasteSpecial Paste: = xlPasteValues, Operation: = xlNone, SkipBlanks _: = false move: = Application false Select .CatCopyMode = False Column ("I:" J: "). Clear Content Columns (" O: O "). Select the Column Column (" E: E "). Activate the Set paste paste column (" F: select F "). select. Intrrt shift: = xlToRight, CopyOrigin: = xlFormatFromLeftOrAbove column (" L ") SelectionkCut select columns (" J & J ") ... ActiveSheet.Paste range (" J1 ") Select Selecti Select on.Copy Category ("L1") .Select ActiveSheet.Paste Application.CutCopyMode = Select False Range ("A1") ActiveCell.FormulaR1C1 = "=" "WMEOnline _" "& amp; RC [9] "range (" A1 ") Selection.AutoFill Select the destination: .. = activ ECell.Range (" A1: A261 ") ActiveCell.Range (" A1: A261 ") Select ActiveCell. Selection Range (select, select. end (xlDown)) selection. copy selection. finally (xlUp). select to .PasteSpecial paste: = xlPasteValues, operation: = xlNone, SkipBlanks _: = false, transferred :. = false Select Application.CutCopyMode = False ActiveCell.Offset (2, 0) .Range ("A1") Select range ("O5"). Select the cell Select Selection Range ("A1"). Activate Selection Copy Workbooks Add ActiveSheet.Paste msgclean = MsgBox ("Cleanup and sorting complete !!" & Amp; VbNewLine & amp; "ready file for LMS." & Amp; VbNewLine & amp; "Please save the file as a CSV format", vbInformation + vbOK only, "WME HOT cleaner template") End Sub < / Code>
Use the following code:
range ( "A1: A" and range ("A" and rows. Count). End (XLEP) .ro). Formula = "= CONCATENATE (RC [1]," "", RC [2]) " Replace A if you do not have column column
Comments
Post a Comment