Tag: Online Excel

Using VBA logical operators AND - OR

VBA Logical Operators in Microsoft Excel




The most common logical operators in VBA are: AND and OR. Each of these operators is very useful for evaluating conditions and making appropriate decisions about the code that will be executed


The AND Logical Operator


The AND logical operator is the operator that helps us to enforce two conditions. This operator allows to execute a block of code that must meet condition1 AND condition2.

In the following example I have the qualification of two exams. Only if both exams have a grade higher than 3, then the student will be approved, otherwise the grade will be disapproval.


VBA Logical Operators Initial Example


We are going to use an IF statement to compare the exams qualification with the grade condition. This comparison is that we usually do with the logical operators.

The code that will be executed when the button is pressed will be the following:


VBA Logical Operators AND Code


When we execute this code we will obtain the “Approved” result, this is because both exams have a rating greater than 3:


VBA Logical Operator AND approved example


In this way we verify that the logical operator And helps us to force both conditions to be fulfilled. However, if the value of one of the cells is less than 3, then we will have a different result:


AND Logical Operator Reprobate Example


The logical operator And will return the true value only when both conditions are met and it will suffice that one of them is not met to obtain a negative result.


The OR Logical Operator


The OR logical operator translates will allow us to know if at least one of the conditions is fulfilled, that is to say, if the condition1 OR condition2 is fulfilled.


If we change the previous example a bit and say that it is sufficient that one of the two grades is greater than 3 for the student to be approved, then we can modify the code as follows:


Code for OR logical operator example


If any of the grades are higher than 3, then the student will be approved:


OR logical Operator Approved Example


The only way the logical OR operator returns a false value is that none of the conditions are met. In our example, the student will be reprobate only when both grades are less than 3:


OR Logical Operator Reprobate Example


To conclude in the following table we can see in each case how the logical operators evaluate the condition:


Conditions Table for VBA Logical Operators AND - OR


Excel Total 



PRICE Excel Function

What is the PRICE Excel Function Used for?



Now we are going to learn all about formulas and functions. This is the best way to learn them:



Returns the price per $100 face value of a security that pays periodic interest.


PRICE(settlement; maturity; rate; yld; redemption; frequency; [basis])


The PRICE function syntax has the following arguments:

  • Settlement Required. The security’s settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
  • Maturity Required. The security’s maturity date. The maturity date is the date when the security expires.
  • Rate Required. The security’s annual coupon rate.
  • Yld Required. The security’s annual yield.
  • Redemption Required. The security’s redemption value per $100 face value.
  • Frequency Required. The number of coupon payments per year. For annual payments; frequency = 1; for semiannual; frequency = 2; for quarterly; frequency = 4.
  • Basis Optional. The type of day count basis to use.
    0 or omitted US (NASD) 30/360
    1 Actual/actual
    2 Actual/360
    3 Actual/365
    4 European 30/360




  • Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default; January 1; 1900 is serial number 1; and January 1; 2008 is serial number 39448 because it is 39;448 days after January 1; 1900.
  • The settlement date is the date a buyer purchases a coupon; such as a bond. The maturity date is the date when a coupon expires. For example; suppose a 30-year bond is issued on January 1; 2008; and is purchased by a buyer six months later. The issue date would be January 1; 2008; the settlement date would be July 1; 2008; and the maturity date would be January 1; 2038; which is 30 years after the January 1; 2008; issue date.
  • Settlement; maturity; frequency; and basis are truncated to integers.
  • If settlement or maturity is not a valid date; PRICE returns the #VALUE! error value.
  • If yld < 0 or if rate < 0; PRICE returns the #NUM! error value.
  • If redemption <= 0; PRICE returns the #NUM! error value.
  • If frequency is any number other than 1; 2; or 4; PRICE returns the #NUM! error value.
  • If basis < 0 or if basis > 4; PRICE returns the #NUM! error value.
  • If settlement => maturity; PRICE returns the #NUM! error value.
  • PRICE is calculated as follows:where:
    • DSC = number of days from settlement to next coupon date.
    • E = number of days in coupon period in which the settlement date falls.
    • N = number of coupons payable between settlement date and redemption date.
    • A = number of days from beginning of coupon period to settlement date.


Interactive Example

Change the white cells data and see the result in the yellow cell.




Using Navigation Tools in Microsoft Excel

Using Navigation Tools in Microsoft Excel

Learn about essential training in Microsoft Excel, one of the first tools that you have to begin to use, the navigation. Save a lot of time, learning basic keyboard combinations, or commands with the mouse, to navigate between worksheets, workbooks, cells, columns, rows, etc. And begin to increase of the productivity in the using of Microsoft Excel You can learn more about Microsoft Excel productivity here: Excel School

VLOOKUP to 36 Different Tables: CHOOSE, OFFSET or INDIRECT function

VLOOKUP to 36 Different Tables with CHOOSE or OFFSET or INDIRECT function

Learn how to: CHOOSE Function Solution, with VLOOKUP and MATCH functions and the asterisk wild card (zero or more characters) OFFSET Function Solution, with VLOOKUP and MATCH functions and the asterisk wild card (zero or more characters) Check is the results for two columns are equivalent using a logical formula and the COUNTIFS function with FALSE Criteria. INDIRECT function Solution, with VLOOKUP and Defined Names You can learn more about Microsoft Excel functions and applications here: Excel Training Videos

Using OFFSET Function in Databases in Microsoft Excel

Using OFFSET Function in Microsoft Excel

Now we are going to see how works the OFFSET function. With the OFFSET function you can returns a reference that is a number of rows and a number of columns from a cell or range of cells selected With this function you can get the specific value in a database, that allows you to search information in big lists of data Let’s see the video and learn how to use the OFFSET function, you can use it with the MATCH function explained in the last video and search specific values in a Database. You can learn more about Microsoft Excel functions and applications here: Excel Training Videos

Using MATCH Function to Manage Databases in Excel

Using MATCH Function to Manage Databases in Excel

In the following video, we are going to use the MATCH function, this functions used with another useful function the OFFSET function, allows you to search specific values in a database

These two functions are really easy to use, and when you learn to use it very well you can get the most out of the manipulation of data in large lists Let’s see the video and learn how to use initially the MATCH function and let’s begin to get data of big lists and databases.

Excel has more and less 300 functions and you can make a lot of formulas to simplify your work. Learn how to construct formulas with the following tool: Excel Formula Helper E-Book


Thank you to Tiger Spreadsheet Solutions for the below video

List of Reminders and Future Tasks in Microsoft Excel

In Microsoft Excel, you can manage all your tasks, or to-do lists in an easy way. With the following video you can see how easy you can manage your time. You now can see that Excel is a place where you can make a lot of things, including some simple applications that allows you to save time.


PV function and FV function in Microsoft Excel

Present Value and Future Value in Microsoft Excel

One of the most commonly used financial functions in Excel are Present value (PV) and Future Value (FV). Both functions use similar arguments so it is only necessary to understand the terminology to use them properly.

The PV() and FV() functions in Excel The arguments for those functions are:

– Nper: The total number of periods. For example, if a monthly payment is made for one year periods total will be 12. If a payment is made monthly for 3 years we will have a total of 36 periods.

– PMT: The payment made each period.

– Rate: The constant interest rate for each period. When we use financial functions must remember that the values can be positive or negative depending on whether you are receiving money or if you are paying. Another important thing to note is that generally interest rates are expressed on an annual basis, so if you’re doing a monthly calculation we divide the interest rate by 12.

The basic sintax for both functions is the following: PV (Rate, Nper, PMT) FV (Rate, Nper, PMT) Now, see the following calculations:

The FV function and the PV function in Microsoft Excel

In this example I have used the same parameters for both the VA function and for the VF function. The future value helps us know how much money we will have in a future date if you start investing today the amount specified with a fixed interest rate. The present value is the value today that we will be making an investment in future payments at a fixed interest rate. Excel Total

Multi Page Userform in Microsoft Excel

Multi Page Userform in Microsoft Excel

This is an Employee Database VBA Code in Microsoft Excel. Here you can learn how to construct the code in VBA that allows you to manage the employee database in your business. Save a lot of time creating this Excel Application using VBA code and Userforms. You can change the Userform too and customize it to your needs, learn the code logic and change the parameters that you need.