Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default male & female lists

Race times are ranked in a worksheet by fastest times regardless of gender.
I wish to create seperate lists of athletes in another worksheet from that
information but listed by gender.
Column A has "male" or "female" and the rest of the row has other info such
as name, time, year and so on up to and including column G.
I am trying to avoid having lists with blank spaces, using filters and so
on. All I require is a simple list of females and another list of males from
the main data.

Any ideas?
--
tia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default male & female lists

On 23 Apr, 11:07, JockW wrote:
Race times are ranked in a worksheet by fastest times regardless of gender.
I wish to create seperate lists of athletes in another worksheet from that
information but listed by gender.
Column A has "male" or "female" and the rest of the row has other info such
as name, time, year and so on up to and including column G.
I am trying to avoid having lists with blank spaces, using filters and so
on. All I require is a simple list of females and another list of males from
the main data.

Any ideas?
--
tia


Make your data a stanbdard list or database. This must have:

Headings at the top
Text, numbers, dates below - but only ever one kind per column

Nothing else touching your list

Put the cursor anywhere in the list and fire up ToolsDataPivotTables
(or whatever it is)

Stand back in amazement as all your problems are solved!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default male & female lists

Assuming that the time is in E, this gives M/F rankings

=$A2&"_"&MATCH($E2,LARGE(IF($A$2:$A$20=$A2,$E$2:$E $20),ROW(INDIRECT("1:"&COUNTIF($A$2:$A$20,$A2)))), 0)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note that you cannot use a whole column in array formulae (prior to excel
2007), but must use an explicit range.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"JockW" wrote in message
...
Race times are ranked in a worksheet by fastest times regardless of
gender.
I wish to create seperate lists of athletes in another worksheet from that
information but listed by gender.
Column A has "male" or "female" and the rest of the row has other info
such
as name, time, year and so on up to and including column G.
I am trying to avoid having lists with blank spaces, using filters and so
on. All I require is a simple list of females and another list of males
from
the main data.

Any ideas?
--
tia



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default male & female lists

You can do it manually of by code using autofilter

manually
Select column A then go to menu Data Filter - Autofilter
then select either Male or Female
copy Column G and Paste where you want the data. You can unselect the
AutoFilter to None if needed.


macro solution

Sheets("Sheet1").Columns("A:A").AutoFilter
Sheets("Sheet1").Cells.AutoFilter field:=1, Criteria1:="Male"
Sheets("Sheet1").Columns("G:G"). _
SpecialCells(xlCellTypeVisible).Copy _
Destination:=Sheets("Sheet2").Range("A1")
'turn autofileter off
Sheets("Sheet1").Cells.AutoFilter

"Bob Phillips" wrote:

Assuming that the time is in E, this gives M/F rankings

=$A2&"_"&MATCH($E2,LARGE(IF($A$2:$A$20=$A2,$E$2:$E $20),ROW(INDIRECT("1:"&COUNTIF($A$2:$A$20,$A2)))), 0)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note that you cannot use a whole column in array formulae (prior to excel
2007), but must use an explicit range.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"JockW" wrote in message
...
Race times are ranked in a worksheet by fastest times regardless of
gender.
I wish to create seperate lists of athletes in another worksheet from that
information but listed by gender.
Column A has "male" or "female" and the rest of the row has other info
such
as name, time, year and so on up to and including column G.
I am trying to avoid having lists with blank spaces, using filters and so
on. All I require is a simple list of females and another list of males
from
the main data.

Any ideas?
--
tia




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default male & female lists

Thanks Bob. Sort of worked in that it correctly identified the gender but
gave the reverse order so that the slowest male had the lowest number rather
than the fastest male and so on.
Ideally, I'd just like to 'suck' out the men's info from sheet1 to sheet 6
and the women's to sheet 7 and have them ranked by time with no empty rows
that, for instance VLOOKUP would give. The results are ging on a web site so
user ability to use filters or pivot tables will vary a lot. Which is why I'm
after the simple solution!

ta


"Bob Phillips" wrote:

Assuming that the time is in E, this gives M/F rankings

=$A2&"_"&MATCH($E2,LARGE(IF($A$2:$A$20=$A2,$E$2:$E $20),ROW(INDIRECT("1:"&COUNTIF($A$2:$A$20,$A2)))), 0)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note that you cannot use a whole column in array formulae (prior to excel
2007), but must use an explicit range.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"JockW" wrote in message
...
Race times are ranked in a worksheet by fastest times regardless of
gender.
I wish to create seperate lists of athletes in another worksheet from that
information but listed by gender.
Column A has "male" or "female" and the rest of the row has other info
such
as name, time, year and so on up to and including column G.
I am trying to avoid having lists with blank spaces, using filters and so
on. All I require is a simple list of females and another list of males
from
the main data.

Any ideas?
--
tia






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default male & female lists

Just change LARGE to SMALL in the formula.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"JockW" wrote in message
...
Thanks Bob. Sort of worked in that it correctly identified the gender but
gave the reverse order so that the slowest male had the lowest number
rather
than the fastest male and so on.
Ideally, I'd just like to 'suck' out the men's info from sheet1 to sheet 6
and the women's to sheet 7 and have them ranked by time with no empty rows
that, for instance VLOOKUP would give. The results are ging on a web site
so
user ability to use filters or pivot tables will vary a lot. Which is why
I'm
after the simple solution!

ta


"Bob Phillips" wrote:

Assuming that the time is in E, this gives M/F rankings

=$A2&"_"&MATCH($E2,LARGE(IF($A$2:$A$20=$A2,$E$2:$E $20),ROW(INDIRECT("1:"&COUNTIF($A$2:$A$20,$A2)))), 0)

which is an array formula, it should be committed with Ctrl-Shift-Enter,
not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets),
do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note that you cannot use a whole column in array formulae (prior to excel
2007), but must use an explicit range.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"JockW" wrote in message
...
Race times are ranked in a worksheet by fastest times regardless of
gender.
I wish to create seperate lists of athletes in another worksheet from
that
information but listed by gender.
Column A has "male" or "female" and the rest of the row has other info
such
as name, time, year and so on up to and including column G.
I am trying to avoid having lists with blank spaces, using filters and
so
on. All I require is a simple list of females and another list of males
from
the main data.

Any ideas?
--
tia






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default male & female lists

Tried that Bob, thanks.
Got it sorted though by tweaking Joel's response.
Appreciate the effort :)
--



"Bob Phillips" wrote:

Just change LARGE to SMALL in the formula.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"JockW" wrote in message
...
Thanks Bob. Sort of worked in that it correctly identified the gender but
gave the reverse order so that the slowest male had the lowest number
rather
than the fastest male and so on.
Ideally, I'd just like to 'suck' out the men's info from sheet1 to sheet 6
and the women's to sheet 7 and have them ranked by time with no empty rows
that, for instance VLOOKUP would give. The results are ging on a web site
so
user ability to use filters or pivot tables will vary a lot. Which is why
I'm
after the simple solution!

ta


"Bob Phillips" wrote:

Assuming that the time is in E, this gives M/F rankings

=$A2&"_"&MATCH($E2,LARGE(IF($A$2:$A$20=$A2,$E$2:$E $20),ROW(INDIRECT("1:"&COUNTIF($A$2:$A$20,$A2)))), 0)

which is an array formula, it should be committed with Ctrl-Shift-Enter,
not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets),
do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note that you cannot use a whole column in array formulae (prior to excel
2007), but must use an explicit range.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"JockW" wrote in message
...
Race times are ranked in a worksheet by fastest times regardless of
gender.
I wish to create seperate lists of athletes in another worksheet from
that
information but listed by gender.
Column A has "male" or "female" and the rest of the row has other info
such
as name, time, year and so on up to and including column G.
I am trying to avoid having lists with blank spaces, using filters and
so
on. All I require is a simple list of females and another list of males
from
the main data.

Any ideas?
--
tia






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I auto transform sets of data? (change "female" to "f") Liz Excel Discussion (Misc queries) 2 April 2nd 23 08:53 PM
Adding data only if adjacent to cell labeled "male"/"female" lovesrubbaducky Excel Worksheet Functions 1 November 23rd 09 05:49 PM
Male/Female notation toby Excel Discussion (Misc queries) 1 December 8th 08 05:20 PM
howdo i make a chart showing grades for male and female students angeleyes New Users to Excel 1 December 4th 07 10:50 PM
How do you define labels (e.g. 1 = male) in excel? Anthony Excel Discussion (Misc queries) 1 July 2nd 07 10:54 AM


All times are GMT +1. The time now is 04:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"