![]() ![]() ![]() ![]() Thank you for driving me in a different direction. Subtracting in Excel using Formulas Given the multitude of ways you might need to subtract values and cells in Excel, Subtract by including Values in the Formula You don’t need to. I realized I hadn't been adding the ".Value" at the end of my Range statements, I wasn't adding the "And" operator to do my comparisons, also, I hadn't adjusted my "B4" Dim as a "Double" to handle my decimals.Īfter I changed all of this the code works perfectly. or using cell references containing the values to be subtracted. ![]() My new code:ĮlseIf (B4 > 3 And B4 5 And B4 7 And B4 17 And B4 18.5 And B4 18.99 And B4 20 And B4 < 23) Then After visiting the Ifs Function article you mentioned I experimented and finally figured it all out. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |