Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

copy and paste defined

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Copy and paste at a defined line (inputbox?)

Copy and paste at a defined line (inputbox?)

ResolvedVersion 2003

Peter has attended:
No courses

Copy and paste at a defined line (inputbox?)

Hello everybody. I am real beginner under VBA...
Here is my problem:

A B C D G H I
line Date Name Value
1 Paul Today Paul 20 000
2 1/07 10 000 Roddy 15 000
3 2/07 15 000
4 3/07 17 000
5 4/07
6 5/07
7 Roddy
8 1/07 8 000
9 2/07 10 000
10 3/07 13 000
11 4/07
12 5/07

Everydays, values in I are updated with a Vlookup, and I copy and pastevalue these figures in D column. If today we are the 4/07, so I would copy 20 000 in D5 and 15 000 in D11.
Problem is that I have actually more than 100 names...

I'm thinking of a solution that can automaticly copy the values in I in appropriate correct sheets with a VB code.

Note that there are always the same numbers on lines (6)between where I want to paste each figure (if I copy 20 000 in D5, then I would copy 15 000 in D5+6 = D11, then in D11+6=D17 etc
What I am thinking is a input box which would ask me: "which lines to you want to start pasting?"
If I say: line "5", then it copies I2 in D5, I3 in D5+6=D11 etc
Tomorow, with new values in I, I will say: start in line "6", then it will copy I2 in D6, I3 in D6+6=D12 etc...

I think an input box would be the best option, but I am not sure about that. Don't hesitate to ask me to clarify if need be.
Many thanks for your help :-)

RE: Copy and paste at a defined line (inputbox?)

lets see if it works:

[IMG]http://img387.imageshack.us/img387/4033/vbqu2.th.png[/IMG] http://img387.imageshack.us/my.php?image=vbqu2.png

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Display Functions on Worksheets

Functions in Excel can be difficult to recall their format/syntax

For example, you want to use the =PMT function.

Enter =PMT, then select keystroke, CTRL+SHIFT+A.

This usful memory jog, will display the arguments of a function on a worksheet, allowing the user to proceed with the generation of the function



View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.