macro to make different tabs in a same sheet

  • Thread starter Thread starter vikram
  • Start date Start date
V

vikram

i have a column in my spreadsheet where there are different names

can u suggest a macro which makes different tabs in that same exce
workbook with the names of different ppl
in front of names there is data, i want that data to be transferre
also along with the respective names in that tab

thank u frnd
 
Try this example
The names are in column A of a sheet named Sheet1

Sub test()
Dim cell As Range
Dim WSNew As Worksheet
For Each cell In Sheets("Sheet1").Columns("A").Cells.SpecialCells(xlCellTypeConstants)
Set WSNew = Sheets.Add
On Error Resume Next
WSNew.Name = cell.Value
If Err.Number > 0 Then
MsgBox "Change the name of : " & WSNew.Name & " manually"
Err.Clear
End If
On Error GoTo 0
Next
End Sub
 
hi thanks for ur macro but in my sheet in column C a same name ca
appear a number of times


what is want is that each name shud get transferred to a new tab an
this message box is not that much required. what do u suggest

thank u so muc
 
Hi

You can't have tabs with the same name
It is up to you what you want do do with the name
 
It sounds like you want to steal some code from Debra Dalgleish's site:

http://www.contextures.com/excelfiles.html

Look for:

Update Sheets from Master -- uses an Advanced Filter to send data from
Master sheet to individual worksheets -- creates a list of unique items,
creates a sheet for each item, then replaces old data with current.
AdvFilterCity.xls 46 kb

and

Create New Sheets from Filtered List -- uses an Advanced Filter to create
separate sheet of orders for each sales rep visible in a filtered list; macro
automates the filter. AdvFilterRepFiltered.xls 35 kb

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Hi

no, i dont want tabs with the same name
there are different names in that column but some names appear twice o
thrice
what i want is that one tab shud belong to one name and it's data
and another tab with another name and so on
yes we cannot have different tabs for the same name in a worksheet,
agree

thank u so much
do u have any idea for this
i know u can find a way out, u r amazing , i saw ur site....wonderfu
 
Mr Ron

i have just checked ur site again and u have a macro there which can d
what i want in" Copy records with the same value in a column to a ne
sheet"

the third one will work for me but the problem there is that i pick
names only and what i want is that it picks up dalta in front of tha
name too

please

in my sheet names are in column C , i want that columns A and B als
get transferred to a new sheet , in other words the entire row get
transferred


thank u so much
u r a king of macro
 
hi ur macro has worked for me, i made the necessary changes and i
worked

can u plz explain me that macro line by line, i will be thankful to
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top