Easy enough but let's try to fully automate. Why skip a21??
Are you saying you want to copy/paste values to B if there is nothing in B
or to C if there are values in B, to D if values in C???
Don Guillett
SalesAid Software
dguille...@gmail.com
-----Original Message-----
From: trawets
Sent: Thursday, December 08, 2011 3:02 AM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ choose column when running macro
Hi
I have a little macro that copies values from one column to another
then returns the first column to zero, what I would like to achieve is
every time I run the macro it either asks me which column I wish to
paste value into or auto progresses through the column i.e. B Then C
then E each time in runs
Preferably the first where it asks me which column to paste the ranges
into
Code:
Sub copy_hours()
Worksheets("sheet1").Range("a1:a20", "a22:a44").Copy
Worksheets("sheet1").Range("c1", "c22").PasteSpecial
Paste:=xlPasteValues
Dim Rg As Range
Set Rg = ActiveSheet.Range("a1:a20", "a22:a44")
Rg.Value = 0
End Subcould anyone suggest how I might achieve this
--
FORUM RULES (934+ members already BANNED for violation)
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security
measure.
4) Acknowledge the responses you receive, good or bad.
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited.
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com
--
FORUM RULES (934+ members already BANNED for violation)
1) Use concise, accurate thread titles. Poor thread titles, like Please Help,
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited.
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com