ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Question? (https://www.excelbanter.com/excel-programming/294209-macro-question.html)

Bob[_51_]

Macro Question?
 


--
-- Can this be scripted into a MacroAfter active cell
go down 16 cells, then go down the column to the next empty cell and
enter (Date)
..Offset(0, 1).Value = "PAYMENT RECEIVED"

So A has the date and B has payment received



Thanks in advance.........Bob



Bob Phillips[_6_]

Macro Question?
 
Hi Bob,

This should do it

With ActiveCell.Offset(16, 0).End(xlDown)
.Value = Format(Date, "dd mm yyyy")
.Offset(0, 1).Value = "PAYMENT RECEIVED"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob" wrote in message ...


--
-- Can this be scripted into a MacroAfter active cell
go down 16 cells, then go down the column to the next empty cell and
enter (Date)
.Offset(0, 1).Value = "PAYMENT RECEIVED"

So A has the date and B has payment received



Thanks in advance.........Bob





Bob[_51_]

Macro Question?
 
that just highlighted the first 8 columns in my work book!


"Bob Phillips" wrote in message
...
Hi Bob,

This should do it

With ActiveCell.Offset(16, 0).End(xlDown)
.Value = Format(Date, "dd mm yyyy")
.Offset(0, 1).Value = "PAYMENT RECEIVED"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob" wrote in message

...


--
-- Can this be scripted into a MacroAfter active cell
go down 16 cells, then go down the column to the next empty cell and
enter (Date)
.Offset(0, 1).Value = "PAYMENT RECEIVED"

So A has the date and B has payment received



Thanks in advance.........Bob







Frank Kabel

Macro Question?
 
Hi Bob
are you sure :-)
works for me. You may post the complete code you have used (including
Bob's suggestion)

--
Regards
Frank Kabel
Frankfurt, Germany

"Bob" schrieb im Newsbeitrag
...
that just highlighted the first 8 columns in my work book!


"Bob Phillips" wrote in message
...
Hi Bob,

This should do it

With ActiveCell.Offset(16, 0).End(xlDown)
.Value = Format(Date, "dd mm yyyy")
.Offset(0, 1).Value = "PAYMENT RECEIVED"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob" wrote in message

...


--
-- Can this be scripted into a MacroAfter active cell
go down 16 cells, then go down the column to the next empty

cell and
enter (Date)
.Offset(0, 1).Value = "PAYMENT RECEIVED"

So A has the date and B has payment received



Thanks in advance.........Bob








Bob[_51_]

Macro Question?
 
Sometimes takes out the last data and replaces it then sometimes goes right
to the bottom of the sheet


"Frank Kabel" wrote in message
...
Hi Bob
are you sure :-)
works for me. You may post the complete code you have used (including
Bob's suggestion)

--
Regards
Frank Kabel
Frankfurt, Germany

"Bob" schrieb im Newsbeitrag
...
that just highlighted the first 8 columns in my work book!


"Bob Phillips" wrote in message
...
Hi Bob,

This should do it

With ActiveCell.Offset(16, 0).End(xlDown)
.Value = Format(Date, "dd mm yyyy")
.Offset(0, 1).Value = "PAYMENT RECEIVED"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob" wrote in message

...


--
-- Can this be scripted into a MacroAfter active cell
go down 16 cells, then go down the column to the next empty

cell and
enter (Date)
.Offset(0, 1).Value = "PAYMENT RECEIVED"

So A has the date and B has payment received



Thanks in advance.........Bob










Bob[_51_]

Macro Question?
 
Yeah its replacing my last cell with data in!

"Bob" wrote in message ...
Sometimes takes out the last data and replaces it then sometimes goes

right
to the bottom of the sheet


"Frank Kabel" wrote in message
...
Hi Bob
are you sure :-)
works for me. You may post the complete code you have used (including
Bob's suggestion)

--
Regards
Frank Kabel
Frankfurt, Germany

"Bob" schrieb im Newsbeitrag
...
that just highlighted the first 8 columns in my work book!


"Bob Phillips" wrote in message
...
Hi Bob,

This should do it

With ActiveCell.Offset(16, 0).End(xlDown)
.Value = Format(Date, "dd mm yyyy")
.Offset(0, 1).Value = "PAYMENT RECEIVED"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob" wrote in message
...


--
-- Can this be scripted into a MacroAfter active cell
go down 16 cells, then go down the column to the next empty

cell and
enter (Date)
.Offset(0, 1).Value = "PAYMENT RECEIVED"

So A has the date and B has payment received



Thanks in advance.........Bob












Rob van Gelder[_4_]

Macro Question?
 
Try
With ActiveCell.Offset(16, 0).End(xlDown).Offset(1,0)

Keep in mind what this code is doing:
From 16 cells below the ActiveCell, press End+Down and place a date in the
next row down and "payment received" in the column next to that.

So if your activecell is at the end of the list already, it's going to try
to get to the very bottom of the worksheet.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Bob" wrote in message ...
Yeah its replacing my last cell with data in!

"Bob" wrote in message

...
Sometimes takes out the last data and replaces it then sometimes goes

right
to the bottom of the sheet


"Frank Kabel" wrote in message
...
Hi Bob
are you sure :-)
works for me. You may post the complete code you have used (including
Bob's suggestion)

--
Regards
Frank Kabel
Frankfurt, Germany

"Bob" schrieb im Newsbeitrag
...
that just highlighted the first 8 columns in my work book!


"Bob Phillips" wrote in message
...
Hi Bob,

This should do it

With ActiveCell.Offset(16, 0).End(xlDown)
.Value = Format(Date, "dd mm yyyy")
.Offset(0, 1).Value = "PAYMENT RECEIVED"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob" wrote in message
...


--
-- Can this be scripted into a MacroAfter active cell
go down 16 cells, then go down the column to the next empty
cell and
enter (Date)
.Offset(0, 1).Value = "PAYMENT RECEIVED"

So A has the date and B has payment received



Thanks in advance.........Bob














Bob[_51_]

Macro Question?
 
Rob you got it BRILLIANT Thanks for your help ..Bob
"Rob van Gelder" wrote in message
...
Try
With ActiveCell.Offset(16, 0).End(xlDown).Offset(1,0)

Keep in mind what this code is doing:
From 16 cells below the ActiveCell, press End+Down and place a date in the
next row down and "payment received" in the column next to that.

So if your activecell is at the end of the list already, it's going to try
to get to the very bottom of the worksheet.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Bob" wrote in message

...
Yeah its replacing my last cell with data in!

"Bob" wrote in message

...
Sometimes takes out the last data and replaces it then sometimes goes

right
to the bottom of the sheet


"Frank Kabel" wrote in message
...
Hi Bob
are you sure :-)
works for me. You may post the complete code you have used

(including
Bob's suggestion)

--
Regards
Frank Kabel
Frankfurt, Germany

"Bob" schrieb im Newsbeitrag
...
that just highlighted the first 8 columns in my work book!


"Bob Phillips" wrote in

message
...
Hi Bob,

This should do it

With ActiveCell.Offset(16, 0).End(xlDown)
.Value = Format(Date, "dd mm yyyy")
.Offset(0, 1).Value = "PAYMENT RECEIVED"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob" wrote in message
...


--
-- Can this be scripted into a MacroAfter active cell
go down 16 cells, then go down the column to the next empty
cell and
enter (Date)
.Offset(0, 1).Value = "PAYMENT RECEIVED"

So A has the date and B has payment received



Thanks in advance.........Bob

















All times are GMT +1. The time now is 04:19 AM.

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