#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 79
Default Need Help

I will try and set this up so maybe someone can tell me what I am doing wrong:
Basically, I am getting a result and determining if it needs to be broken
out further nad trying to the answers input somewhere else to see if the
number of digits matches up.

So I get the result 6...then in one box I have 6 and in other I have 6...if
I get the result 3/12....then in one box I have 3 and in the other I have 12.
This number represents the number of digits required so if it does not match
6, 6, 3, or 12..then the input is incorrect. Right now, I am using an If
statement where if the length of whatever is in a cell matches 6,6,3, or 12
then put OK otherwise ERROR. Now, I can get it to work for the 6,6 but not
the 3 or 12 which are tied into a complicated process before hand. When I
check the length of character in the 3 or 12 boxes it shows me 2. Why is
that? Shouldn't that be 1? Any help would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Need Help

If the fields are text , try using TRIM to remove any extraneous blanks.

e.g.

=If (LEN(Trim(A1)) ......etc)

[Re your posting earlier (yesterday?) about separating 3/12 into two
columns. I get a field of length 1 for the 3 using the formulae provided and
2 for the 12]



"A.S." wrote:

I will try and set this up so maybe someone can tell me what I am doing wrong:
Basically, I am getting a result and determining if it needs to be broken
out further nad trying to the answers input somewhere else to see if the
number of digits matches up.

So I get the result 6...then in one box I have 6 and in other I have 6...if
I get the result 3/12....then in one box I have 3 and in the other I have 12.
This number represents the number of digits required so if it does not match
6, 6, 3, or 12..then the input is incorrect. Right now, I am using an If
statement where if the length of whatever is in a cell matches 6,6,3, or 12
then put OK otherwise ERROR. Now, I can get it to work for the 6,6 but not
the 3 or 12 which are tied into a complicated process before hand. When I
check the length of character in the 3 or 12 boxes it shows me 2. Why is
that? Shouldn't that be 1? Any help would be greatly appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 79
Default Need Help

This still does not work. Let me show you what happen....it might be the
formula I am using:

I have: 6 6 and I trim it to 6 6
I can change an option and may have: 3 12 and I trim it to 3 12

Now..in another cell I input a number and that number must match the number
of digits in the first cell or second cell so one option it matches 6 or 6
digts and if I pick another option it needs to have 3 digits or 12 digits.
The formula I am using is:

IF(OR(LEN(H11)=L5,LEN(H11)=M5),"OK ","ERROR")

H11 is the input which may be 123456 and L5/M5 is 6/6 or if another option
is chosen its 3/12. So if I pick the 3/12 option...than I will get an error
unless the number input is 123 OR 123456789123 (12 digits). Please let me
know how you think this can be resolved. Thanks for you help.

"Toppers" wrote:

If the fields are text , try using TRIM to remove any extraneous blanks.

e.g.

=If (LEN(Trim(A1)) ......etc)

[Re your posting earlier (yesterday?) about separating 3/12 into two
columns. I get a field of length 1 for the 3 using the formulae provided and
2 for the 12]



"A.S." wrote:

I will try and set this up so maybe someone can tell me what I am doing wrong:
Basically, I am getting a result and determining if it needs to be broken
out further nad trying to the answers input somewhere else to see if the
number of digits matches up.

So I get the result 6...then in one box I have 6 and in other I have 6...if
I get the result 3/12....then in one box I have 3 and in the other I have 12.
This number represents the number of digits required so if it does not match
6, 6, 3, or 12..then the input is incorrect. Right now, I am using an If
statement where if the length of whatever is in a cell matches 6,6,3, or 12
then put OK otherwise ERROR. Now, I can get it to work for the 6,6 but not
the 3 or 12 which are tied into a complicated process before hand. When I
check the length of character in the 3 or 12 boxes it shows me 2. Why is
that? Shouldn't that be 1? Any help would be greatly appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Need Help

I would love to help, but I'm confuzed as to what you need. Please be so
kind as to re-state your problem, giving specific cell addresses where you
have data, and where you have formulas and what those formulas are, and what
returns you expect from them.......

Thanks,
Vaya con Dios,
Chuck, CABGx3




"A.S." wrote:

I will try and set this up so maybe someone can tell me what I am doing wrong:
Basically, I am getting a result and determining if it needs to be broken
out further nad trying to the answers input somewhere else to see if the
number of digits matches up.

So I get the result 6...then in one box I have 6 and in other I have 6...if
I get the result 3/12....then in one box I have 3 and in the other I have 12.
This number represents the number of digits required so if it does not match
6, 6, 3, or 12..then the input is incorrect. Right now, I am using an If
statement where if the length of whatever is in a cell matches 6,6,3, or 12
then put OK otherwise ERROR. Now, I can get it to work for the 6,6 but not
the 3 or 12 which are tied into a complicated process before hand. When I
check the length of character in the 3 or 12 boxes it shows me 2. Why is
that? Shouldn't that be 1? Any help would be greatly appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 79
Default Need Help

Let's say in cell H1 I am inputting data: 123456

Now...I have set up the file so that the number of digits is checked to see
if this is the number required. In this case let's say the number required is
6...and this is in let's say cell L1...where length of 6 is being checked and
in this case I would get an "OK"...Now let's say an option is changed so that
the number of digits required or that is acceptable is 3 OR 12..so now I
would get an "ERROR" message until the input is changed to 3 digits or 12
digits.

Now I have posted this before so the 3 or 12 digits comes form a previous
complicated formula where I broke apart the data which came as "3/12". and I
broke the 3 into one cell (L1) and the 12 (M1) into another. In another case
in stead of "3/12", I may have gotten a 6...and I have broken that out into 2
cells as well so that if the other option is chosen 6 will appear in L1 and 6
will appear in M1.

Basically, right now my formula reads:
IF(OR(LEN(H1)=L1,LEN(H11)=M5),"OK ","ERROR")

This formula is reading fine for the 6...which isn't broken out from a
previous formula but is not reading correctly the 3 or 12. I tried the option
which requires 3 or 12 digits and it still reads error and it still reads
this after i have trimmed the cell. I hope this clarifies the situation.
Please let me know.

"CLR" wrote:

I would love to help, but I'm confuzed as to what you need. Please be so
kind as to re-state your problem, giving specific cell addresses where you
have data, and where you have formulas and what those formulas are, and what
returns you expect from them.......

Thanks,
Vaya con Dios,
Chuck, CABGx3




"A.S." wrote:

I will try and set this up so maybe someone can tell me what I am doing wrong:
Basically, I am getting a result and determining if it needs to be broken
out further nad trying to the answers input somewhere else to see if the
number of digits matches up.

So I get the result 6...then in one box I have 6 and in other I have 6...if
I get the result 3/12....then in one box I have 3 and in the other I have 12.
This number represents the number of digits required so if it does not match
6, 6, 3, or 12..then the input is incorrect. Right now, I am using an If
statement where if the length of whatever is in a cell matches 6,6,3, or 12
then put OK otherwise ERROR. Now, I can get it to work for the 6,6 but not
the 3 or 12 which are tied into a complicated process before hand. When I
check the length of character in the 3 or 12 boxes it shows me 2. Why is
that? Shouldn't that be 1? Any help would be greatly appreciated.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Need Help

No wonder we are confused .... what's in H11 and M5 which are only mentioned
in your formula.

Give a set of sample data in tabular form (H1, L1 and M1) .

"A.S." wrote:

Let's say in cell H1 I am inputting data: 123456

Now...I have set up the file so that the number of digits is checked to see
if this is the number required. In this case let's say the number required is
6...and this is in let's say cell L1...where length of 6 is being checked and
in this case I would get an "OK"...Now let's say an option is changed so that
the number of digits required or that is acceptable is 3 OR 12..so now I
would get an "ERROR" message until the input is changed to 3 digits or 12
digits.

Now I have posted this before so the 3 or 12 digits comes form a previous
complicated formula where I broke apart the data which came as "3/12". and I
broke the 3 into one cell (L1) and the 12 (M1) into another. In another case
in stead of "3/12", I may have gotten a 6...and I have broken that out into 2
cells as well so that if the other option is chosen 6 will appear in L1 and 6
will appear in M1.

Basically, right now my formula reads:
IF(OR(LEN(H1)=L1,LEN(H11)=M5),"OK ","ERROR")

This formula is reading fine for the 6...which isn't broken out from a
previous formula but is not reading correctly the 3 or 12. I tried the option
which requires 3 or 12 digits and it still reads error and it still reads
this after i have trimmed the cell. I hope this clarifies the situation.
Please let me know.

"CLR" wrote:

I would love to help, but I'm confuzed as to what you need. Please be so
kind as to re-state your problem, giving specific cell addresses where you
have data, and where you have formulas and what those formulas are, and what
returns you expect from them.......

Thanks,
Vaya con Dios,
Chuck, CABGx3




"A.S." wrote:

I will try and set this up so maybe someone can tell me what I am doing wrong:
Basically, I am getting a result and determining if it needs to be broken
out further nad trying to the answers input somewhere else to see if the
number of digits matches up.

So I get the result 6...then in one box I have 6 and in other I have 6...if
I get the result 3/12....then in one box I have 3 and in the other I have 12.
This number represents the number of digits required so if it does not match
6, 6, 3, or 12..then the input is incorrect. Right now, I am using an If
statement where if the length of whatever is in a cell matches 6,6,3, or 12
then put OK otherwise ERROR. Now, I can get it to work for the 6,6 but not
the 3 or 12 which are tied into a complicated process before hand. When I
check the length of character in the 3 or 12 boxes it shows me 2. Why is
that? Shouldn't that be 1? Any help would be greatly appreciated.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 79
Default Need Help

That was an error the formula should read:

IF(OR(LEN(H1)=L1,LEN(H1)=M1),"OK ","ERROR")

The numbers/example is the same.


"Toppers" wrote:

No wonder we are confused .... what's in H11 and M5 which are only mentioned
in your formula.

Give a set of sample data in tabular form (H1, L1 and M1) .

"A.S." wrote:

Let's say in cell H1 I am inputting data: 123456

Now...I have set up the file so that the number of digits is checked to see
if this is the number required. In this case let's say the number required is
6...and this is in let's say cell L1...where length of 6 is being checked and
in this case I would get an "OK"...Now let's say an option is changed so that
the number of digits required or that is acceptable is 3 OR 12..so now I
would get an "ERROR" message until the input is changed to 3 digits or 12
digits.

Now I have posted this before so the 3 or 12 digits comes form a previous
complicated formula where I broke apart the data which came as "3/12". and I
broke the 3 into one cell (L1) and the 12 (M1) into another. In another case
in stead of "3/12", I may have gotten a 6...and I have broken that out into 2
cells as well so that if the other option is chosen 6 will appear in L1 and 6
will appear in M1.

Basically, right now my formula reads:
IF(OR(LEN(H1)=L1,LEN(H11)=M5),"OK ","ERROR")

This formula is reading fine for the 6...which isn't broken out from a
previous formula but is not reading correctly the 3 or 12. I tried the option
which requires 3 or 12 digits and it still reads error and it still reads
this after i have trimmed the cell. I hope this clarifies the situation.
Please let me know.

"CLR" wrote:

I would love to help, but I'm confuzed as to what you need. Please be so
kind as to re-state your problem, giving specific cell addresses where you
have data, and where you have formulas and what those formulas are, and what
returns you expect from them.......

Thanks,
Vaya con Dios,
Chuck, CABGx3




"A.S." wrote:

I will try and set this up so maybe someone can tell me what I am doing wrong:
Basically, I am getting a result and determining if it needs to be broken
out further nad trying to the answers input somewhere else to see if the
number of digits matches up.

So I get the result 6...then in one box I have 6 and in other I have 6...if
I get the result 3/12....then in one box I have 3 and in the other I have 12.
This number represents the number of digits required so if it does not match
6, 6, 3, or 12..then the input is incorrect. Right now, I am using an If
statement where if the length of whatever is in a cell matches 6,6,3, or 12
then put OK otherwise ERROR. Now, I can get it to work for the 6,6 but not
the 3 or 12 which are tied into a complicated process before hand. When I
check the length of character in the 3 or 12 boxes it shows me 2. Why is
that? Shouldn't that be 1? Any help would be greatly appreciated.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Need Help

All the testing I have done works BUT with the following changes:

=VALUE(LEFT(F1,FIND("/",F1)-1)) in L1

=VALUE(MID(F1,FIND("/",F1)+1,255)) in M1

to convert values to numeric (F1 contains 3/12 as text)

If I change H1, I always get the correct status

123 with L1=3, M1=12 is OK
123456789012 with L1=3, M1=12 is OK
ABCDEFGHIJK with L1=3, M1=12 is ERROR

HTH

"A.S." wrote:

That was an error the formula should read:

IF(OR(LEN(H1)=L1,LEN(H1)=M1),"OK ","ERROR")

The numbers/example is the same.


"Toppers" wrote:

No wonder we are confused .... what's in H11 and M5 which are only mentioned
in your formula.

Give a set of sample data in tabular form (H1, L1 and M1) .

"A.S." wrote:

Let's say in cell H1 I am inputting data: 123456

Now...I have set up the file so that the number of digits is checked to see
if this is the number required. In this case let's say the number required is
6...and this is in let's say cell L1...where length of 6 is being checked and
in this case I would get an "OK"...Now let's say an option is changed so that
the number of digits required or that is acceptable is 3 OR 12..so now I
would get an "ERROR" message until the input is changed to 3 digits or 12
digits.

Now I have posted this before so the 3 or 12 digits comes form a previous
complicated formula where I broke apart the data which came as "3/12". and I
broke the 3 into one cell (L1) and the 12 (M1) into another. In another case
in stead of "3/12", I may have gotten a 6...and I have broken that out into 2
cells as well so that if the other option is chosen 6 will appear in L1 and 6
will appear in M1.

Basically, right now my formula reads:
IF(OR(LEN(H1)=L1,LEN(H11)=M5),"OK ","ERROR")

This formula is reading fine for the 6...which isn't broken out from a
previous formula but is not reading correctly the 3 or 12. I tried the option
which requires 3 or 12 digits and it still reads error and it still reads
this after i have trimmed the cell. I hope this clarifies the situation.
Please let me know.

"CLR" wrote:

I would love to help, but I'm confuzed as to what you need. Please be so
kind as to re-state your problem, giving specific cell addresses where you
have data, and where you have formulas and what those formulas are, and what
returns you expect from them.......

Thanks,
Vaya con Dios,
Chuck, CABGx3




"A.S." wrote:

I will try and set this up so maybe someone can tell me what I am doing wrong:
Basically, I am getting a result and determining if it needs to be broken
out further nad trying to the answers input somewhere else to see if the
number of digits matches up.

So I get the result 6...then in one box I have 6 and in other I have 6...if
I get the result 3/12....then in one box I have 3 and in the other I have 12.
This number represents the number of digits required so if it does not match
6, 6, 3, or 12..then the input is incorrect. Right now, I am using an If
statement where if the length of whatever is in a cell matches 6,6,3, or 12
then put OK otherwise ERROR. Now, I can get it to work for the 6,6 but not
the 3 or 12 which are tied into a complicated process before hand. When I
check the length of character in the 3 or 12 boxes it shows me 2. Why is
that? Shouldn't that be 1? Any help would be greatly appreciated.

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



All times are GMT +1. The time now is 03:29 PM.

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

About Us

"It's about Microsoft Excel"