Extracting data new collumn

G

G

I'm trying to extract the name of a person (first, last) to a separate
collumn if in the column next to the name, there appears a "1". Any
thoughts would be appreicated. TIA. For example
A B C
D
Last First Attend
Name attending
Doe John 1
John Doe
Doe Jane
 
D

Don Guillett

formula
=if(c1=1,a1&", "&b1)
macro
sub ifname()
for each c in range("c1:c100")
if c=1 then c.offset(,1)=c.offset(,-1)&", "&c.offset(,-2)
next
end sub
 
E

Earl Kiosterud

G,

I'm not sure from your example, but it appears that You have now:

Last First Attend
Name Attending
Doe John 1
Doe Jane

and want to end up with:
Last First Attend
Name Attending
Doe John 1
John Doe
Doe Jane

where the Doe John row was somehow inserted.

I recommend you use a separate column for the new data:

Last First Attend Full Name Attendees
Doe John 1 =IF(C2=1, B2 & " " & A2, "")
Doe Jane
Copy down the formula in D2 with the fill handle or Copy/Paste. Now you'll
have the combined names in column C, and can paste them somewhere, or use an
Autofilter or Advanced fileter to get a list of only those names without
empty spaces.

Earl Kiosterud
mvpearl omitthisword at verizon period net
 
D

Debra Dalgleish

You can do this with an AutoFilter:

1. Select a cell in the list, and choose Data>Filter>AutoFilter
2. From the dropdown list in the Attend column heading, choose 1
3. Select all the names that are visible.
4. Choose Edit>Copy
5. Select a cell in a blank area of the workbook, and choose Edit>Paste
6. To remove the filter, select a cell in the list, and choose
Data>Filter>AutoFilter
 

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

Top