Formula to create seat bookings - Multiple labels of the same name.

Tarrynlee

New Member
Joined
Nov 2, 2020
Messages
1
Office Version
  1. 2010
Platform
  1. Windows
I am wondering if there us a formula to take names from one sheet and put them on another sheet. For example John Smith has booked 5 seats, so I need 5 labels that say John Smith.
SHEET 1
SEATSNAME
5JOHN SMITH
2ANNA ROGERS

SHEET 2
JOHN SMITH
JOHN SMITH
JOHN SMITH
JOHN SMITH
JOHN SMITH
ANNA ROGERS
ANNA ROGERS

Really hoping someone can help make life easier for me.

TIA Tarrynlee
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Tarrynlee let's get the ball rolling. Now this should start the conversation anyway. This isn't a formula but a program. It's a start. If you aren't familiar with VBA then let us know. Usually some of the A Students will weigh in and suggests some ideas too. So this should be a good start.

VBA Code:
Sub Tables()

Dim LastRow As Long
Dim Row1 As Long
Dim Row2 As Long
Dim Cnt1 As Long
Dim Cnt2 As Long
Dim Cnt3 As Long

LastRow = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
Row2 = 1
Cnt2 = 1
Cnt3 = 1

For Row1 = 3 To LastRow

Cnt1 = Sheets("Sheet1").Cells(Row1, 1).Value

For Cnt3 = 1 To Cnt1
Sheets("Sheet2").Cells(Row2, 1) = Sheets("Sheet1").Cells(Row1, 2)
Cnt2 = Cnt2 + 1
Row2 = Row2 + 1

Next Cnt3
Row2 = Cnt2

Next Row1


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

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