ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macros (https://www.excelbanter.com/excel-programming/281556-macros.html)

Valerie[_3_]

Macros
 
I am trying to make a macro that enters a specific price
(ie: $50.00) and after this to have the next selected

cell
be the next empty cell down at the beginning of the row.
Right now when I make the macro the cursor always

returns
to the specific cell it went to before (ie: B4). I

don't
understand why it returns to that specific cell b/c it's
not set up as an absolute cell reference.

Help!


Valerie,

Post a copy of your macro and be a little more specific

in your description:
which cell gets the $50.00 and which cell you want to go

to.
example: C4 gets $50.00 goto A5
C5 gets $50.00 goto A6
Sounds like you have Range("B4").Select in your code.
--

Steve,
You are correct with your example. Here is a copy of the
macro I end up with.

Sub Macro1()
'
' Macro1 Macro
' Und Inspect Fee $24.50
'
' Keyboard Shortcut: Ctrl+j
'
ActiveCell.FormulaR1C1 = "24.5"
Range("B4").Select
End Sub

Thanks for any help.


Dave Peterson[_3_]

Macros
 
like this?

Option Explicit

Sub Macro1()
'
' Macro1 Macro
' Und Inspect Fee $24.50
'
' Keyboard Shortcut: Ctrl+j
'
ActiveCell.FormulaR1C1 = "24.5"
Cells(ActiveCell.Row + 1, 1).Select
End Sub


Valerie wrote:

I am trying to make a macro that enters a specific price
(ie: $50.00) and after this to have the next selected

cell
be the next empty cell down at the beginning of the row.
Right now when I make the macro the cursor always

returns
to the specific cell it went to before (ie: B4). I

don't
understand why it returns to that specific cell b/c it's
not set up as an absolute cell reference.

Help!


Valerie,

Post a copy of your macro and be a little more specific

in your description:
which cell gets the $50.00 and which cell you want to go

to.
example: C4 gets $50.00 goto A5
C5 gets $50.00 goto A6
Sounds like you have Range("B4").Select in your code.
--

Steve,
You are correct with your example. Here is a copy of the
macro I end up with.

Sub Macro1()
'
' Macro1 Macro
' Und Inspect Fee $24.50
'
' Keyboard Shortcut: Ctrl+j
'
ActiveCell.FormulaR1C1 = "24.5"
Range("B4").Select
End Sub

Thanks for any help.


--

Dave Peterson



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com