For each X, repeat Y times

Tycho_vk

New Member
Joined
May 12, 2011
Messages
2
Hi Guys!

I have been searching and searching, and maybe I'm using the wrong keywords. Anyway, what I want to do (which isn't getting me far atm):

I'm organising an event, and I want to give nameplates (like badges) to everyone with their name on it. So I got a list of people who are coming in excel (one column with first names, one column with surnames).

So what I want to do, is make excel put those two together in one (new) field, and add a field below that with the name of the event. And do that for each of the first name + surname rows.

For testing, I'm trying something out, but no luck so far :(. See image. For some reason, when I try to copy the formula down, it does not continue where it stopped. Either way, this does not seem to be the most optimal way to do this.

excelk.jpg



Can anyone help me?
Thanks in advance!
Greets,
Tycho
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Welcome to the board.

Not sure I follow your problem, but based on the screenshots, try this macro:
Code:
Sub InvasionOfCarrots ()
Dim i as Long, j as Long
Application.ScreenUpdating = False
j = 1
For i = 1 to Range("F" & Rows.Count).End(xlup).Row
  Range("I" & j) = Range("F" & i)
  j = j + 2
Next i
Application.ScreenUpdating = True
End Sub
 
Upvote 0
JackDanIce, thank you for your amazingly fast and informative answer. I've already learned a lot, and I'm going to try to figure out the rest as well :).
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,158
Members
452,892
Latest member
yadavagiri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top