Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
translate lotus 1-2-3 macro into excel macro using excel 2000 krutledge0209 Excel Programming 1 November 2nd 04 05:50 PM


All times are GMT +1. The time now is 09:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"