In this SharePoint tutorial, I will show you how to generate random numbers using a SharePoint calculated column. I will provide two examples related to “**SharePoint calculated column random number**“.

I will show two examples here. The first one will **generate a two or three-digit random number in a SharePoint list by using a calculated column**. And the second will **show some random messages using a calculated column in the SharePoint Online list.**

## Create random numbers using SharePoint calculated column (Digits)

You can follow the below steps to create a random number calculated column in the SharePoint list:

- Open the SharePoint list, where you need to create a random number.
- Click on the
**+Add column**-> Choose**See all column types**-> Then click on the**OK**button.

- In Create column page, provide the column name and choose the type as
**Calculated (calculation based on other columns)**as shown below:

- Now, provide the formula in the formula box. Based on my requirement, I provided the formula as shown below:

`=LEFT(RIGHT(NOW(),3),3)`

Where,

**LEFT**: This function is used to get the 1st letter.**RIGHT**: This function is used to get the 1st letter.**NOW()**: This function calculates a value based on the date and time. We can easily get the random number different by picking up the time from here.**3**: Passing the argument like how many values should be present in the calculated column.

**The data type returned from this formula is**: Choose the data type, that the result value should be.- Then, click on the
**OK**button.

- Now open your SharePoint list, and the calculated column will be added with random numbers.

- As per the above image, we can see that all random numbers are similar (For existing items), but if I add another item in the title column, the random number will change because the seconds will be changing based on that it will generate a random number as shown below:

This is how to create a random number calculated column in a SharePoint list.

## Create random messages using calculated column in a SharePoint list

With an example, let me explain how to **create a random message calculated column in the SharePoint list**:

I have a SharePoint list of **Employee Onboarding**, where the new employees should fill their information in this list. Whenever a user fills details in the SharePoint list, they will receive a random message in the “Motivate” calculated column. Check out the below figure for reference.

Now we will see how to achieve it:

- Open the SharePoint list, where you need to create a random message.
- Click on the
**+Add column**-> Choose**See all column types**-> Then click on the**OK**button. - In Create column page, provide the column name and choose the type as
**Calculated (calculation based on other columns)**as shown below:

- Now, provide the formula in the formula box. Based on my requirement, I provided the formula as shown below:

`=CHOOSE(LEFT(RIGHT(NOW(),2),1)+1,"I love your confidence","Thank you for your good work","Wow!","Thanks!","You've been a great addition to the team!","Welcome","a free coffee for you!",":-)","I'm excited to work with someone with your experience","You're very creative")`

Where,

**CHOOSE**: This function is used to select any random value from the set of the message where we provided in the function.**LEFT**: This function is used to get the 1st letter.**RIGHT**: This function is used to get the last letter.**NOW()**: This function calculates a value based on the date and time. We can easily get the random number different by picking up the time from here.- The rest all are a list of motivating text arguments.

**The data type returned from this formula is**: Choose the data type, that the result value should be.- Then, click on the
**OK**button.

- Now open your SharePoint list; the calculated column will be added with random messages.

This is how to create a random message calculated column in the SharePoint Online list.

## Conclusion

Using a calculated column, I have shown you how to generate a three-digit random number in a SharePoint list.

Moreover, I have explained** how to show some random messages using a calculated column in the SharePoint Online list.**

You may also like:

- SharePoint calculated column get month from date
- SharePoint calculated column: difference between two dates
- SharePoint Calculated Column If Statement

Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book **Microsoft Power Platform A Deep Dive.**Â She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.