Excel/Formula or macro question
Could you help me with this new issue?
I have a workbook which contains several worksheets. One worksheet "Sheet2rng" contains a column entitled "Group" This column contains a list of different classes. In a column entitled "name" will be the names of all of the students.
In another sheet called "SPtemplate" there is a cell "B1" where I might input the name of a class.
When I input the name of the class, I would like all of the students in that class to populate another area of the worksheet "SPtemplate" D1:D40.
Is this possible to do using formula?
Yes, it can be done with an array formula.
in D1 and entered with Ctrl+shift+Enter rather than just Enter since this is an array formula
then drag fill D1 down to D40
this is the raw formula. It will produce errors once you go past the number of students in that class. So if you only have 20 students, D21:D40 would display #Value. You can enclose the formula in IFERROR(formula,"") to avoid that.
I have assumed that Group and name are named ranges per your description. If you just mean that is the text in row 1 of the sheet in the appropriate column (i.e. commonly called a column header), then in the formula they would have to be replaced with something like
also, name and group should cover the same number of rows.
Or they could be column headers in a defined table but I would have to look at how to properly address those as I don't use defined tables.
if you need more help than that, you would have to send a workbook to firstname.lastname@example.org
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here