# Formula to copy 1 cell by number in another

Solved/Closed
tanz25
Posts
4
Registration date
Tuesday July 13, 2010
Status
Member
Last seen
July 14, 2010
- Jul 12, 2010 at 11:58 PM
tanz25
Posts
4
Registration date
Tuesday July 13, 2010
Status
Member
Last seen
July 14, 2010
- Jul 14, 2010 at 05:34 PM
I have a spread sheet with text and numbers in a1 to c1 and then in d1 is a number that i need it copy and pasted by

E.G

Hello 3
Stuff 6
hannah 2

I need 3x hello 6x stuff 2xhannah however in my spread sheet that i need done i have about 3000 records i need this done for

Any one know how to do this.

Hope this makes senses
Related:

## 2 replies

rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
770
Jul 13, 2010 at 09:51 PM
tanz25
Posts
4
Registration date
Tuesday July 13, 2010
Status
Member
Last seen
July 14, 2010

Jul 13, 2010 at 10:15 PM
unfortunately this doesn't make since to me
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
770
Jul 14, 2010 at 05:12 PM
That's a macro that does 100% exactly what you seek
tanz25
Posts
4
Registration date
Tuesday July 13, 2010
Status
Member
Last seen
July 14, 2010

Jul 14, 2010 at 05:34 PM
Thank you i have figured out how to use this now.
Hi Tanz,

If I understand you correctly you would like cell D1 to be like this:
Hello Hello Hello Stuff Stuff Stuff Stuff Stuff Stuff hannah hannah

First you need to split your data into two columns. Go to top menu Data > Text to columns (or delimiter) and follow on screen directions.

Now use this formula in D1:
=REPT(A1 & " ",B1) & REPT(A2 & " ",B2) & REPT(A3 & " ",B3)

Is this the result you were looking for?

Best regards,
Trowa
tanz25
Posts
4
Registration date
Tuesday July 13, 2010
Status
Member
Last seen
July 14, 2010

Jul 13, 2010 at 02:41 PM
This is very close to what i need except i need it to be in separate cells
so i need it to be
Hello
hello
hello
Stuff
Stuff
Stuff
Stuff
Stuff
Stuff
Hannah
Hannah