View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
[email protected] ryan.c.christiansen@gmail.com is offline
external usenet poster
 
Posts: 5
Default Excel 2007 B2 - Selecting every cell that starts with a certain word

If you don't want to mess around with VBA, try this.

In the first column, use

=IF(ISERROR(FIND("Item",A1)),"",A1)


In the second column, use

=IF(LEFT(A1,4)="Item",OFFSET(A1,1,0),IF(LEFT(TEXT( A1,"$##.##"),1)="$","",IF(LEFT(OFFSET(A1,-1,0),4)="Item","",A1)))


In the third column, use

=IF(ISERROR(FIND("$",TEXT(A1,"$##.##"))),IF(ISERRO R(FIND("Item",A1)),IF(ISERROR(FIND("$",TEXT(OFFSET (A1,-1,0),"$##.##"))),"",OFFSET(A1,1,0)),OFFSET(A1,2,0) ),"")


This should give you what you want, but you will have some blank rows.
The following Help topic from office.microsoft.com will help you to
delete the blank rows.

Delete duplicate rows from a list in Excel Help

A duplicate row (also called a record) in a list is one where all
values in the row are an exact match of all the values in another row.
To delete duplicate rows, you filter a list for unique rows, delete the
original list, and then replace it with the filtered list. The original
list must have column headers.

Caution Because you are permanently deleting data, it's a good idea
to copy the original list to another worksheet or workbook before using
the following procedure.

Select all the rows, including the column headers, in the list you want
to filter.
Tip

Click the top left cell of the range, and then drag to the bottom right
cell.
On the Data menu, point to Filter, and then click Advanced Filter.
In the Advanced Filter dialog box, click Filter the list, in place.
Select the Unique records only check box, and then click OK.
The filtered list is displayed and the duplicate rows are hidden.

On the Edit menu, click Office Clipboard.
The Clipboard task pane is displayed.

Make sure the filtered list is still selected, and then click Copy .
The filtered list is highlighted with bounding outlines and the
selection appears as an item at the top of the Clipboard.

On the Data menu, point to Filter, and then click Show All.
The original list is re-displayed.

Press the DELETE key.
The original list is deleted.

In the Clipboard, click on the filtered list item.
The filtered list appears in the same location as the original list.



Is this what you're looking for?

-Ryan




wrote:
This is an extreme newbie question i'm sure, but here goes. I have
approximately 3500 cells of data, but the data is in one column. For
example it goes:

A1 Item 614371
A2 1/2" Binder, Black
A3 $4.59

like that for about 1,000 items. I need to get the rows that begin with
the word "Item" in column A, the item names in column B, and the prices
(begin with $) in column C. The problem is, some items have no item
number, and thus are only in two rows - item name and price.
How would I go about getting all this data in three columns without
manually entering it all? I'm running Excel 2007 Beta 2.

Thank you very much for your help.

-Josh