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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Access (Is it understood correctly)

Status
Not open for further replies.

Troopa

Technical User
Nov 9, 2001
96
GB
Hi,

Could someone let me know if my thinking on this function is correct?

=IF(AND(V10<=16000, V10>=10500),1000,V10/10)

If my understanding is correct then what it's saying is that if the value in cell V10 is between 10500 and 16000 then the value in this field should be 1000 but if it's not between 10500 and 16000 then divide the number by 10 and show that number.

I'm trying to convert it into a query in Access and if my assumption is correct then I should be on to a winner...cheers
 
yes that is true.

But I am sure you could try and verify it yourself, could you not???

And with Excel you do have a good help (F1) for most of these functions, and this would also give you the answer.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Thanks for confirming. Are you suggesting that I shouldn't have posted this? If you are, then sorry but it's nice to have 'someone' confirm that your thinking is correct. The MS Help isn't that much help sometimes and I just didn't think to test it out by adding different values.

You could have just ignored the post ;-)
 
For your query this sql qould be sufficient

...
WHERE CASE WHEN field>=10500 AND field<=16000 THEN 1000 ELSE field/10 END AS resultheader
...

// Patrik
______________________________

To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the IT Professional, the glass is twice as big as it needs to be.
 
Troopa - this is not an excel issue - it is a logic issue that you could easily test yourself by putting some test data in the appropriate cells and seeing what comes out.

The ethos of this site is that posts do not get ignored but at the same time, questions should be relevant to the forum.

I'm not saying that you shouldn't have posted but for future reference, it's a fine line and you are pretty close to it...

Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
alright point noted

thanks for your post Patrik, much appriciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top