Concatenation question

  • Thread starter Thread starter Jesse
  • Start date Start date
J

Jesse

I am trying to calculate an if to return values between certain numbers (say
between 50 and 100). I would like to have my '>50' and '<100' arguments
defined in a cell so I can change criteria without editing formula. My
formula is as follows:

=IF(AND(D6&$H$6,D6&$H$7),D6,"")

Where
D6 - the number to be tested -- '26.2'
H6 - first argument -- '>50'
H7 - second argument -- '<100'

My problem is that when excel concatenates (&) the argument it adds
quotes -- ie. below:

=IF(AND("26.2>50","26.2<100"),D6,"")

With quotes it throws a #Value! error. How do I prevent this?

-Jesse
 
I don't think there was any need to create another thread on the same
issue...

=IF(COUNTIF(D6,H6)*COUNTIF(D6,H7),D6,"")
 
Sorry.

Due to the help and input from the members of this group. My problem
changed. Although related, I though it should be in a new thread.

Sorry if I misunderstood. I'm still new to this newsgroup system.

Also, your solution worked. Thank you.
 
Back
Top