Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

something wrong with this conditional???

Status
Not open for further replies.

natedeia

Technical User
May 8, 2001
365
US
=and(a2<=a1+10,a2>=a1-10,a2<=a3+10,a2>=a3-10)

I am just trying to get a cell in a column to high light if it is "X" amount more or less that the cell. it would be ideal if someone could help me with doing this in VB which will save me on file size. but fat chance there, so can you see what is wrong with this conditonal?
 
Can't tell what you are really trying to do. It would seem that you could use conditional formatting. Can you post some sample data and the desired results?

Also, as you work your way down the rows, it seems that some of the tests might be redundant, but again it is hard to know without some specific data.
 

yea i think some of the test are redundant too, as i am not a pro yet, i usually hang out in the Flash forum, i am learning this stuff but only been at it a month so far, thanks so much for checking out my spreadsheet, it is only representing an example. when i run a query, they can be thousands of lines of data that i have to go through! so this will be one less thing to sort, resort, relook over ...
 
With your data in say A1:C1000, highlight A3:C1000 and in the CF option change to 'Formula is' and use

=AND(A2/100<=(A1/100+10),A2/100>=(A1/100-10),A2/100<=(A3/100+10),A2/100>=(A3/100-10))

That seems to match your data

It doesn't ignore the last 2 characters, it simply accounts for it in the calculation using the divisor of 100.

Regards
Ken....................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
thank you Ken for replying, i am going to try that code asap, as soon as i get to work, thanks so much, hope you have fixed that prob, that is a new approach for me, thanks for the lesson,
know anything about the second question on the spreadsheet?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top