Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
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 | Excel Worksheet Functions | |||
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 | Excel Discussion (Misc queries) | |||
Error Reporting | Excel Worksheet Functions | |||
Pivot table for reporting sales performance | Excel Discussion (Misc queries) | |||
Reporting results of pivot table | Excel Worksheet Functions |