Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Finding an occurence

Hi There,
Two columns of Data
A1 to A10 text (say dog, cat, mouse etc)
B1 to B10 - either a 1 or a 0 - 1 is a problem, 0 is okay. (these change
based on other criteria)

I would like to list beneath the data all instances of problems (ie for
all cases where column B has a zero, list the value in column A). Not
sure if combination of Match or Index would do it, but Im struggling!

Any ideas most welcome....

Regards

D


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Finding an occurence

If you add headers, a Filter (menu Data | Filter) will do it. Choose
Advanced Filter if you want to put the results elsewhere.

Hth,
Merjet


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Finding an occurence

Sorry - forgot to mention - CANT be autofilter - as it needs to happen
automatically without user involvement.

Regards

D



*** Sent via Developersdex http://www.developersdex.com ***
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Finding an occurence

Try this.

Sub macro1()
Sheets("Sheet1").Range("A13:B22").Clear
iRow = 13
For Each c In Sheets("Sheet1").Range("B1:B10")
If c = 1 Then
Sheets("Sheet1").Range("A" & iRow) = c.Offset(0, -1)
Sheets("Sheet1").Range("B" & iRow) = c
iRow = iRow + 1
End If
Next c
End Sub

Hth,
Merjet


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
Finding last occurence of Interior.ColorIndex 36 Linda New Users to Excel 2 May 28th 10 07:04 AM
Finding first occurence of a number beginner here Excel Worksheet Functions 10 November 28th 07 01:17 AM
Still stuck on finding the last occurence...thanks... ste mac Excel Programming 8 January 6th 07 02:11 PM
Finding how many events since last occurence in a database list Tony the Bajan Excel Worksheet Functions 3 November 2nd 06 10:32 PM
Finding most common occurence of values in cells containing letters and numbers sparklyballs Excel Worksheet Functions 2 August 18th 06 12:16 PM


All times are GMT +1. The time now is 03:37 AM.

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"