Create cards from Excel table
emulo
-
emulo -
emulo -
Hello everyone,
I am new here and in VBA, I am trying to do something a bit too complicated for me as a beginner, but that's how you learn!
To explain, I have a table with about 50 rows of analyses, but in the name column, several analyses correspond to the same group. I would like to create an Excel sheet for each sample group and have the results appear on that sheet.
For the loop that creates the sheets, I think it's good, but how do I insert the data from the first table that I'm interested in onto each sheet created afterwards?
Sub add_sheets()
Dim name, c
For Each c In Range("groupe")
name = c.Value
Sheets.Add Count:=1, after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = name
Next c
End Sub
Thank you in advance for your suggestions, I'm a bit lost!
Elise
I am new here and in VBA, I am trying to do something a bit too complicated for me as a beginner, but that's how you learn!
To explain, I have a table with about 50 rows of analyses, but in the name column, several analyses correspond to the same group. I would like to create an Excel sheet for each sample group and have the results appear on that sheet.
For the loop that creates the sheets, I think it's good, but how do I insert the data from the first table that I'm interested in onto each sheet created afterwards?
Sub add_sheets()
Dim name, c
For Each c In Range("groupe")
name = c.Value
Sheets.Add Count:=1, after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = name
Next c
End Sub
Thank you in advance for your suggestions, I'm a bit lost!
Elise
2 answers
-
Hello emulo and welcome!
To be able to help you, I need to know the structure of your file and what data you want to dispatch.
Post an example of your file (with dummy names) including the main sheet and a filled group sheet as you would like it on mon-partage.fr, create a link that you copy and come back to paste here.
Best regards,
Via
--
"Imagination is more important than knowledge." A. Einstein