Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default look-up table - or - error reporting

hi, please help

i have a database something like the below,
and i need to run a script so that i can search the Dam's name cloumn 4
find her name in column 1 - and report back if she is not a "bitch"
example "Le Grange Tessa" is a dam - but is a dog

Name Sex Sire Dam
Bob At Quovadis Dog Roodebult Simba Le Grange Tessa
Roodebult Simba Dog Byrne Bobby Sebastiaan Tessa
Byrne Bobby Dog Mizpah Thor Slamat Lyla
Mizpah Thor Dog
Slamat Lyla Bitch
Sebastiaan Tessa Bitch Sebastiaan Monty Hansom Sophfie
Sebastiaan Monty Dog
Hansom Sophfie Bitch
Le Grange Tessa Dog Ferrou Bruno Jess Cloe


regards
EngelseBoer
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default look-up table - or - error reporting

Here's some code - put in a standard module and run "Foo"
Assumes Sex is eithe Dog or Bitch...

Sub Foo()
Set Rng = Range("D2:D" & Range("D65536").End(xlUp).Row)
With Rng
Set Rng1 = .Find(what:="Le Grange Tessa", lookat:=xlWhole)
If Rng1.Offset(0, -2).Value = "Dog" Then
MsgBox "Your selection is a Dog"
Else
MsgBox "Your selection is a Bitch"
End If
End With
End Sub

"EngelseBoer" wrote:

hi, please help

i have a database something like the below,
and i need to run a script so that i can search the Dam's name cloumn 4
find her name in column 1 - and report back if she is not a "bitch"
example "Le Grange Tessa" is a dam - but is a dog

Name Sex Sire Dam
Bob At Quovadis Dog Roodebult Simba Le Grange Tessa
Roodebult Simba Dog Byrne Bobby Sebastiaan Tessa
Byrne Bobby Dog Mizpah Thor Slamat Lyla
Mizpah Thor Dog
Slamat Lyla Bitch
Sebastiaan Tessa Bitch Sebastiaan Monty Hansom Sophfie
Sebastiaan Monty Dog
Hansom Sophfie Bitch
Le Grange Tessa Dog Ferrou Bruno Jess Cloe


regards
EngelseBoer

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default look-up table - or - error reporting

eeeekkk
i wouldnt know how to use this
????????

"JMay" wrote:

Here's some code - put in a standard module and run "Foo"
Assumes Sex is eithe Dog or Bitch...

Sub Foo()
Set Rng = Range("D2:D" & Range("D65536").End(xlUp).Row)
With Rng
Set Rng1 = .Find(what:="Le Grange Tessa", lookat:=xlWhole)
If Rng1.Offset(0, -2).Value = "Dog" Then
MsgBox "Your selection is a Dog"
Else
MsgBox "Your selection is a Bitch"
End If
End With
End Sub

"EngelseBoer" wrote:

hi, please help

i have a database something like the below,
and i need to run a script so that i can search the Dam's name cloumn 4
find her name in column 1 - and report back if she is not a "bitch"
example "Le Grange Tessa" is a dam - but is a dog

Name Sex Sire Dam
Bob At Quovadis Dog Roodebult Simba Le Grange Tessa
Roodebult Simba Dog Byrne Bobby Sebastiaan Tessa
Byrne Bobby Dog Mizpah Thor Slamat Lyla
Mizpah Thor Dog
Slamat Lyla Bitch
Sebastiaan Tessa Bitch Sebastiaan Monty Hansom Sophfie
Sebastiaan Monty Dog
Hansom Sophfie Bitch
Le Grange Tessa Dog Ferrou Bruno Jess Cloe


regards
EngelseBoer

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default look-up table - or - error reporting

i don't know how to use or apply this advise
my list is some 36,000 animals (rows)
is it possible to do what i need running the info down an ajoining cell
relative to the aminal ?

like we do when using if and sum statements etc?
i don't even know how to evoke the "foo" script you gave me

"JMay" wrote:

Here's some code - put in a standard module and run "Foo"
Assumes Sex is eithe Dog or Bitch...

Sub Foo()
Set Rng = Range("D2:D" & Range("D65536").End(xlUp).Row)
With Rng
Set Rng1 = .Find(what:="Le Grange Tessa", lookat:=xlWhole)
If Rng1.Offset(0, -2).Value = "Dog" Then
MsgBox "Your selection is a Dog"
Else
MsgBox "Your selection is a Bitch"
End If
End With
End Sub

"EngelseBoer" wrote:

hi, please help

i have a database something like the below,
and i need to run a script so that i can search the Dam's name cloumn 4
find her name in column 1 - and report back if she is not a "bitch"
example "Le Grange Tessa" is a dam - but is a dog

Name Sex Sire Dam
Bob At Quovadis Dog Roodebult Simba Le Grange Tessa
Roodebult Simba Dog Byrne Bobby Sebastiaan Tessa
Byrne Bobby Dog Mizpah Thor Slamat Lyla
Mizpah Thor Dog
Slamat Lyla Bitch
Sebastiaan Tessa Bitch Sebastiaan Monty Hansom Sophfie
Sebastiaan Monty Dog
Hansom Sophfie Bitch
Le Grange Tessa Dog Ferrou Bruno Jess Cloe


regards
EngelseBoer

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default look-up table - or - error reporting

nevermind -- i figured it out

"EngelseBoer" wrote:

hi, please help

i have a database something like the below,
and i need to run a script so that i can search the Dam's name cloumn 4
find her name in column 1 - and report back if she is not a "bitch"
example "Le Grange Tessa" is a dam - but is a dog

Name Sex Sire Dam
Bob At Quovadis Dog Roodebult Simba Le Grange Tessa
Roodebult Simba Dog Byrne Bobby Sebastiaan Tessa
Byrne Bobby Dog Mizpah Thor Slamat Lyla
Mizpah Thor Dog
Slamat Lyla Bitch
Sebastiaan Tessa Bitch Sebastiaan Monty Hansom Sophfie
Sebastiaan Monty Dog
Hansom Sophfie Bitch
Le Grange Tessa Dog Ferrou Bruno Jess Cloe


regards
EngelseBoer

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
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Error Reporting Freddo Excel Worksheet Functions 1 May 6th 06 11:49 PM
Pivot table for reporting sales performance Ram Excel Discussion (Misc queries) 2 February 6th 06 10:06 AM
Reporting results of pivot table Julie Excel Worksheet Functions 5 January 31st 06 06:58 PM


All times are GMT +1. The time now is 07:15 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"