![]() |
Excel Macro Help
How can I edit the following macro to repeat no matter how many rows are in
my spreadsheet? Sub EnterFix() ' ' EnterFix Macro ' Macro recorded 4/4/2008 by Auskalnis_Jeanne ' ' Range("A3").Select ActiveCell.FormulaR1C1 = "213681" Range("A4").Select ActiveCell.FormulaR1C1 = "343166" Range("A5").Select ActiveCell.FormulaR1C1 = "352980" Range("A6").Select ActiveCell.FormulaR1C1 = "355008" Range("A7").Select ActiveCell.FormulaR1C1 = "356666" Range("A8").Select ActiveCell.FormulaR1C1 = "381720" Range("A9").Select ActiveCell.FormulaR1C1 = "384401" Range("A10").Select ActiveCell.FormulaR1C1 = "711220" Range("A11").Select ActiveCell.FormulaR1C1 = "711320" Range("A12").Select ActiveCell.FormulaR1C1 = "711520" Range("A13").Select ActiveCell.FormulaR1C1 = "711830" Range("A14").Select ActiveCell.FormulaR1C1 = "712380" Range("A15").Select ActiveCell.FormulaR1C1 = "713080" Range("A16").Select ActiveCell.FormulaR1C1 = "713180" Range("A17").Select ActiveCell.FormulaR1C1 = "714080" Range("A18").Select ActiveCell.FormulaR1C1 = "714180" Range("A19").Select ActiveCell.FormulaR1C1 = "715130" Range("A20").Select ActiveCell.FormulaR1C1 = "715150" Range("A21").Select ActiveCell.FormulaR1C1 = "715280" Range("A22").Select ActiveCell.FormulaR1C1 = "715380" Range("A23").Select ActiveCell.FormulaR1C1 = "715480" Range("A24").Select ActiveCell.FormulaR1C1 = "715530" Range("A25").Select ActiveCell.FormulaR1C1 = "715850" Range("A26").Select End Sub |
Excel Macro Help
For i = 3 To Cells(Rows.Count, 1).End(xlUp).Row
Set curCell = Worksheets("Sheet1").Cells(i, 1) curCell.Offset(0, 1) = _ "Not sure where you are getting this value" Next i "Jeanne A" wrote: How can I edit the following macro to repeat no matter how many rows are in my spreadsheet? Sub EnterFix() ' ' EnterFix Macro ' Macro recorded 4/4/2008 by Auskalnis_Jeanne ' ' Range("A3").Select ActiveCell.FormulaR1C1 = "213681" Range("A4").Select ActiveCell.FormulaR1C1 = "343166" Range("A5").Select ActiveCell.FormulaR1C1 = "352980" Range("A6").Select ActiveCell.FormulaR1C1 = "355008" Range("A7").Select ActiveCell.FormulaR1C1 = "356666" Range("A8").Select ActiveCell.FormulaR1C1 = "381720" Range("A9").Select ActiveCell.FormulaR1C1 = "384401" Range("A10").Select ActiveCell.FormulaR1C1 = "711220" Range("A11").Select ActiveCell.FormulaR1C1 = "711320" Range("A12").Select ActiveCell.FormulaR1C1 = "711520" Range("A13").Select ActiveCell.FormulaR1C1 = "711830" Range("A14").Select ActiveCell.FormulaR1C1 = "712380" Range("A15").Select ActiveCell.FormulaR1C1 = "713080" Range("A16").Select ActiveCell.FormulaR1C1 = "713180" Range("A17").Select ActiveCell.FormulaR1C1 = "714080" Range("A18").Select ActiveCell.FormulaR1C1 = "714180" Range("A19").Select ActiveCell.FormulaR1C1 = "715130" Range("A20").Select ActiveCell.FormulaR1C1 = "715150" Range("A21").Select ActiveCell.FormulaR1C1 = "715280" Range("A22").Select ActiveCell.FormulaR1C1 = "715380" Range("A23").Select ActiveCell.FormulaR1C1 = "715480" Range("A24").Select ActiveCell.FormulaR1C1 = "715530" Range("A25").Select ActiveCell.FormulaR1C1 = "715850" Range("A26").Select End Sub |
Excel Macro Help
I think I need to explain what I'm attempting to do. I have a spreadsheet
with numbers already entered in the rows in column A. I'm actually clicking on cell A3, clicking in the formula bar at the end of the data, and then hitting the enter key. This places me on cell A4 and then I'm just repeating for each row. Your procedure doesn't perform the "clicking in the formula bar & hitting enter". Any ideas? "Mike" wrote: For i = 3 To Cells(Rows.Count, 1).End(xlUp).Row Set curCell = Worksheets("Sheet1").Cells(i, 1) curCell.Offset(0, 1) = _ "Not sure where you are getting this value" Next i "Jeanne A" wrote: How can I edit the following macro to repeat no matter how many rows are in my spreadsheet? Sub EnterFix() ' ' EnterFix Macro ' Macro recorded 4/4/2008 by Auskalnis_Jeanne ' ' Range("A3").Select ActiveCell.FormulaR1C1 = "213681" Range("A4").Select ActiveCell.FormulaR1C1 = "343166" Range("A5").Select ActiveCell.FormulaR1C1 = "352980" Range("A6").Select ActiveCell.FormulaR1C1 = "355008" Range("A7").Select ActiveCell.FormulaR1C1 = "356666" Range("A8").Select ActiveCell.FormulaR1C1 = "381720" Range("A9").Select ActiveCell.FormulaR1C1 = "384401" Range("A10").Select ActiveCell.FormulaR1C1 = "711220" Range("A11").Select ActiveCell.FormulaR1C1 = "711320" Range("A12").Select ActiveCell.FormulaR1C1 = "711520" Range("A13").Select ActiveCell.FormulaR1C1 = "711830" Range("A14").Select ActiveCell.FormulaR1C1 = "712380" Range("A15").Select ActiveCell.FormulaR1C1 = "713080" Range("A16").Select ActiveCell.FormulaR1C1 = "713180" Range("A17").Select ActiveCell.FormulaR1C1 = "714080" Range("A18").Select ActiveCell.FormulaR1C1 = "714180" Range("A19").Select ActiveCell.FormulaR1C1 = "715130" Range("A20").Select ActiveCell.FormulaR1C1 = "715150" Range("A21").Select ActiveCell.FormulaR1C1 = "715280" Range("A22").Select ActiveCell.FormulaR1C1 = "715380" Range("A23").Select ActiveCell.FormulaR1C1 = "715480" Range("A24").Select ActiveCell.FormulaR1C1 = "715530" Range("A25").Select ActiveCell.FormulaR1C1 = "715850" Range("A26").Select End Sub |
Excel Macro Help
Why are you doing this click and ENTER?
To change the data from text to number? Easier would be to format all to General then copy an empty cell. Select the entire column of numbers and Paste SpecialAddOKEsc. Gord Dibben MS Excel MVP On Fri, 4 Apr 2008 12:10:01 -0700, Jeanne A wrote: I think I need to explain what I'm attempting to do. I have a spreadsheet with numbers already entered in the rows in column A. I'm actually clicking on cell A3, clicking in the formula bar at the end of the data, and then hitting the enter key. This places me on cell A4 and then I'm just repeating for each row. Your procedure doesn't perform the "clicking in the formula bar & hitting enter". Any ideas? |
Excel Macro Help
This spreadsheet is a result of an Access query that pulls data from our
Lawson Supply Chain system. For whatever reason when I use vlookup to on this field it will not recognize the data in the cell until I press enter in the field. I've trimmed the field, tried formatting the cells several different ways. Your solution worked except the fields that contained text characters & dashes. Any other ideas? "Gord Dibben" wrote: Why are you doing this click and ENTER? To change the data from text to number? Easier would be to format all to General then copy an empty cell. Select the entire column of numbers and Paste SpecialAddOKEsc. Gord Dibben MS Excel MVP On Fri, 4 Apr 2008 12:10:01 -0700, Jeanne A wrote: I think I need to explain what I'm attempting to do. I have a spreadsheet with numbers already entered in the rows in column A. I'm actually clicking on cell A3, clicking in the formula bar at the end of the data, and then hitting the enter key. This places me on cell A4 and then I'm just repeating for each row. Your procedure doesn't perform the "clicking in the formula bar & hitting enter". Any ideas? |
All times are GMT +1. The time now is 06:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com