Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Max
 
Posts: n/a
Default Question regarding how to search a column and print a row(s)

One non-array formulas play ..

Assume source data is in Sheet1, cols A to O, data from row2 down
Assume the key col is col B, with the criteria: 150

In an empty col to the right, say col Q
Put in Q2: =IF(B2="","",IF(AND(ISNUMBER(B2),B2150),ROW(),"") )
Copy Q2 down to say Q100 to cover the max extent of data expected in the
source
(Leave Q1 empty)

Col Q is the criteria col which will simply assign arbitrary row numbers to
lines which satisfy the criteria. Col Q's returns will be read by the
formulas in Sheet2.

In a new Sheet2
-------
Copy paste the same headers from Sheet1 into A1:O1

Put in A2:
=IF(ISERROR(SMALL(Sheet1!$Q:$Q,ROWS($A$1:A1))),"", INDEX(Sheet1!A:A,MATCH(SMA
LL(Sheet1!$Q:$Q,ROWS($A$1:A1)),Sheet1!$Q:$Q,0)))

Copy A2 across to O2, fill down to O100
(cover the same range as done in col Q in Sheet1)

Sheet2 will return only the rows from Sheet1 which satisfy the criteria, i.e
those rows with values in col B 150. Result rows will be bunched neatly at
the top
---
If the criteria to be set in col Q is say:
where the text string "OK" appears in col B

Then we could put instead in Q2:
=IF(B2="","",IF(ISNUMBER(SEARCH("OK",B2)),ROW(),"" ))
and just copy down as before

(Change SEARCH to FIND if the case is important. FIND is case sensitive)

Sheet2 will then return the desired results ..

Adapt to suit ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Gary Braida" wrote in message
...
Hello,

I have a spreadsheet consisting of 15 columns and 100 rows. I would like

to
search a column for a specific string or based on some other criteria

(e.g.,
150) and for columns meeting the desired criteria, I would like to

print
the entire row (all columns) within the same worksheet or on a new
worksheet. Can this be done using one or more formulas but without

getting
into VB or fancy macros? Can this be done period? I'm looking for
something that searches the column using the same or similar approach as

the
"sumif" function but instead of summing the specificed range, I want to
print the rows.

Thank you in advance for your support. Please reply to .
Thank you very much!

Regards,
Gary Braida




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
two column search thephoenix12 Excel Discussion (Misc queries) 10 June 21st 05 04:22 PM
Search within a part of a column OBIPEDA Excel Discussion (Misc queries) 2 June 16th 05 07:28 PM
Search and Replace Question Rebecca New Users to Excel 1 April 11th 05 04:49 AM
Simple Search and Replace Question Rebecca Excel Discussion (Misc queries) 2 April 3rd 05 03:33 PM
test for date in column question Buster Excel Worksheet Functions 1 December 10th 04 04:38 AM


All times are GMT +1. The time now is 06:49 PM.

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

About Us

"It's about Microsoft Excel"