Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Excel > Excel

LinkBack Thread Tools Display Modes
Old 02-05-2016, 09:26 AM
WisCowboy WisCowboy is offline Windows XP Office 2010 32bit
Join Date: Feb 2016
Posts: 1
WisCowboy is on a distinguished road
Default Can you do True or False equations in Excel?

Hello everyone.

I'm currently working up a program at work on Excel 2010 for the medical field. I'm trying to make the equation for drugs to be used from written orders. However, we typically work in milligrams but sometimes drugs are in Micrograms, Nanograms, Grams, and even Grains. The cell I'm having problems with; I'm trying to make it a True = (the drug is in milligrams then move to the next part of the equation) or False = (the drug is in a different concentration so take the number from cell #X and times or divide it by #N to put that result into the next part of the equation).

This also leaves me another potential problem too. Depending on if this requires more then one cell to complete, can I make an equation that states something to the following, (Take either # from cell X OR # from cell Y and then times it by cell Z)?

I was trying to use the =IF function but not sure if that is the right one to use. So far what I've put in, always comes back as an error. I'm hoping the solution will be an easy command and doesn't require to make someone rack their brain too hard. Thanks for the assistance.
Reply With Quote
Old 02-05-2016, 04:53 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,394
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold

Excel's IF function certainly does TRUE/FALSE processing, and this can be combined with AND & OR functions, etc., as well as being nested. For example:

=IF(A1="milligrams",B1,IF(A1="micrograms",B1*1000, 0))

If you want something more specific, you'll need to provide further details. It would also be helpful if you could attach a worksheet to a post with some representative data (delete anything sensitive). You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
Paul Edstein
[MS MVP - Word]
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded SWF - 'Playing' is false after run Cosmo PowerPoint 14 11-03-2013 01:21 AM
Task Indicator - All predecessors complete true/false, y/n jdove78 Project 2 10-10-2012 05:53 PM
False fonts in word peterv Word 5 07-19-2012 02:11 AM
Mail Merge Function not Noticing 'True' vs. 'False' Statement danellekent Mail Merge 1 04-27-2012 02:19 AM
Macro not staying true oluc Word VBA 4 11-21-2010 08:10 AM

All times are GMT -7. The time now is 07:18 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc. is not affiliated with Microsoft