Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi, Penny-
I started working on a solution for you and got sidetracked (my boss is so impetuous that way). Your earlier post said you're working with Bates numbering- are your document numbers contiguous, or do they have gaps? Also, by any chance are the documents related to a client entered as two numbers in two cells (the lowest document number and the highest document number), or are they entered in a single cell in the format 12003-12212? More globally speaking, do you have the latitude within your organization to re-arrange the data if you need to, in order to make this lookup idea possible? DaveO |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dave - You are such a sweetheart! Thank you. Sorry to have reposted. I
don't post often enough to know how best to do this. And how dare that boss of yours! Aren't they all the same way. I'm still using docs with Bates numbers. For the lack of a better explanation from me, I'm trying to inventory all the docs. I do have complete control over the data and how it is entered and manipulated. For now, I have the bates number data in one field, but that can be changed. Some records have one doc, some have hundreds within the field. Should that be my first step, separate the beginning and ending of the range of docs? Hope this isn't too much info. I have not had enough caffeine this morning. Thanks again for your time. It is so very much appreciated. Penny "Dave O" wrote: Hi, Penny- I started working on a solution for you and got sidetracked (my boss is so impetuous that way). Your earlier post said you're working with Bates numbering- are your document numbers contiguous, or do they have gaps? Also, by any chance are the documents related to a client entered as two numbers in two cells (the lowest document number and the highest document number), or are they entered in a single cell in the format 12003-12212? More globally speaking, do you have the latitude within your organization to re-arrange the data if you need to, in order to make this lookup idea possible? DaveO |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Just a sample:
Lets say you have a row for each block of documents, with the number of the first doc in col A and the number of the last doc in column B and the Client name in column C: 1 10 client 1 20 25 client 2 60 62 client 3 33 37 client 2 So docs numbered 1 thru 10 are assign to client 1, etc. First enter this small macro: Sub Macro1() Dim r As Range Dim j, k, l As Long Set r = Intersect(ActiveSheet.UsedRange, Columns("A:A")) j = r.Rows.Count k = --InputBox("Enter document number:") For l = 1 To j If k = Cells(l, 1).Value Then If k <= Cells(l, 2).Value Then MsgBox ("Document Number " & k & " Client " & Cells(l, 3).Value) Exit Sub End If End If Next MsgBox ("Document Number " & k & " not assigned") End Sub When run, the macro will ask for a document number and return the client name. If the number entered is not assigned, the macro will tell you so. -- Gary's Student "Penny" wrote: Dave - You are such a sweetheart! Thank you. Sorry to have reposted. I don't post often enough to know how best to do this. And how dare that boss of yours! Aren't they all the same way. I'm still using docs with Bates numbers. For the lack of a better explanation from me, I'm trying to inventory all the docs. I do have complete control over the data and how it is entered and manipulated. For now, I have the bates number data in one field, but that can be changed. Some records have one doc, some have hundreds within the field. Should that be my first step, separate the beginning and ending of the range of docs? Hope this isn't too much info. I have not had enough caffeine this morning. Thanks again for your time. It is so very much appreciated. Penny "Dave O" wrote: Hi, Penny- I started working on a solution for you and got sidetracked (my boss is so impetuous that way). Your earlier post said you're working with Bates numbering- are your document numbers contiguous, or do they have gaps? Also, by any chance are the documents related to a client entered as two numbers in two cells (the lowest document number and the highest document number), or are they entered in a single cell in the format 12003-12212? More globally speaking, do you have the latitude within your organization to re-arrange the data if you need to, in order to make this lookup idea possible? DaveO |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You guys are amazing. Thanks so much. I'm trying this now. I really
appreciate it. Penny "Gary''s Student" wrote: Just a sample: Lets say you have a row for each block of documents, with the number of the first doc in col A and the number of the last doc in column B and the Client name in column C: 1 10 client 1 20 25 client 2 60 62 client 3 33 37 client 2 So docs numbered 1 thru 10 are assign to client 1, etc. First enter this small macro: Sub Macro1() Dim r As Range Dim j, k, l As Long Set r = Intersect(ActiveSheet.UsedRange, Columns("A:A")) j = r.Rows.Count k = --InputBox("Enter document number:") For l = 1 To j If k = Cells(l, 1).Value Then If k <= Cells(l, 2).Value Then MsgBox ("Document Number " & k & " Client " & Cells(l, 3).Value) Exit Sub End If End If Next MsgBox ("Document Number " & k & " not assigned") End Sub When run, the macro will ask for a document number and return the client name. If the number entered is not assigned, the macro will tell you so. -- Gary's Student "Penny" wrote: Dave - You are such a sweetheart! Thank you. Sorry to have reposted. I don't post often enough to know how best to do this. And how dare that boss of yours! Aren't they all the same way. I'm still using docs with Bates numbers. For the lack of a better explanation from me, I'm trying to inventory all the docs. I do have complete control over the data and how it is entered and manipulated. For now, I have the bates number data in one field, but that can be changed. Some records have one doc, some have hundreds within the field. Should that be my first step, separate the beginning and ending of the range of docs? Hope this isn't too much info. I have not had enough caffeine this morning. Thanks again for your time. It is so very much appreciated. Penny "Dave O" wrote: Hi, Penny- I started working on a solution for you and got sidetracked (my boss is so impetuous that way). Your earlier post said you're working with Bates numbering- are your document numbers contiguous, or do they have gaps? Also, by any chance are the documents related to a client entered as two numbers in two cells (the lowest document number and the highest document number), or are they entered in a single cell in the format 12003-12212? More globally speaking, do you have the latitude within your organization to re-arrange the data if you need to, in order to make this lookup idea possible? DaveO |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
No such thing as too much caffeine. I forgot to ask: are your Bates
numbers *always* numeric, or might they have alpha characters? By any chance do the clients have account numbers that are also *always* numeric? Is it possible that a client might have document numbers from 1 - 50, 60-75, and 1002-1009, for example? Separating the start number and end number of a given range will likely be helpful, but we don't have to decide that yet. |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
NEVER too much caffeine. Grabbed some while I was eagerly awaiting another
response. :-) Since my post yesterday, I've made things even more complicated (not by choice!) I'm going to have two distinct bates stamps for each document. And they do have alphas in them. (One set from Respondent and one from Claimant - some overlap between docs.) For now, I have the alpha characters in a sep field. And I did correct the range within one field, made it two sep fields. I do have account numbers that are alpha and numeric. The account numbers all start with a number. You are correct on the client example. If it matters, there are single docs in the range as well. Example: Brewer has docs labeled 5319, 5325-5898, 6315-6594, etc. Can't thank you enough. I battled it for too long before turning to you guys for help. "Dave O" wrote: No such thing as too much caffeine. I forgot to ask: are your Bates numbers *always* numeric, or might they have alpha characters? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Working with range of numbers in a cell and searching same | Excel Discussion (Misc queries) | |||
Working with range of numbers in a cell and searching same | Excel Worksheet Functions | |||
searching a range for a sum... | Excel Worksheet Functions | |||
Searching a range of numbers for a specified total | Excel Worksheet Functions | |||
Searching a Range for a number over 40 | Excel Worksheet Functions |