Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I have the following macro. How do I paste the rownumber in cell H32? Sub test() myrow = ActiveCell.Row ActiveSheet.Next.Select Range("H32").Select End Sub -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=556426 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Sub PostRow() Dim MyRow As Long MyRow = ActiveCell.Row ActiveSheet.Next.Select Range("H32").Select ActiveCell.Value = myrow End Sub -- Kevin Backmann "leonidas" wrote: Hi, I have the following macro. How do I paste the rownumber in cell H32? Sub test() myrow = ActiveCell.Row ActiveSheet.Next.Select Range("H32").Select End Sub -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=556426 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
myrow = ActiveCell.row
Range("h32").Value = myrow Duncan leonidas wrote: Hi, I have the following macro. How do I paste the rownumber in cell H32? Sub test() myrow = ActiveCell.Row ActiveSheet.Next.Select Range("H32").Select End Sub -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=556426 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hit the button too soon. try
Sub test() ActiveSheet.Next.Range("h3") = ActiveCell.Row End Sub -- Don Guillett SalesAid Software "leonidas" wrote in message ... Hi, I have the following macro. How do I paste the rownumber in cell H32? Sub test() myrow = ActiveCell.Row ActiveSheet.Next.Select Range("H32").Select End Sub -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=556426 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, Thank you all for your help! All solutions are working perfect! -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=556426 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
except that mine did not involve selections.
-- Don Guillett SalesAid Software "leonidas" wrote in message ... Hi, Thank you all for your help! All solutions are working perfect! -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=556426 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I agree Don,
Yours definately thought outside of the box and provided a complete solution removing the need to select which is more efficient. I did not pay attention to that bit myself, but then I am also still learning. Duncan Don Guillett wrote: except that mine did not involve selections. -- Don Guillett SalesAid Software "leonidas" wrote in message ... Hi, Thank you all for your help! All solutions are working perfect! -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=556426 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro that will paste a number in first blank cell of a column | Excel Discussion (Misc queries) | |||
Macro to paste x number of times | Excel Discussion (Misc queries) | |||
how do I paste without EXCEL increasing the cell number ? | Excel Worksheet Functions | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming |