Sunday, August 6, 2023

How to generate Sequence dates, Random number table in Excel


We can generate sequence Dates using Sequence functions.

```sh

#Following is the formula to generate sequence Dates

=TEXT(DATE(2024,1,1)+SEQUENCE(1,7,0,1),"DD-mmm-YYYY")

#Following is the formula to generate sequence Months

=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())+SEQUENCE(1,7),DAY(TODAY())),"mmm-YYYY")

#Following is the formula to generate sequence Years

=TEXT(DATE(YEAR(TODAY()+SEQUENCE(1,7)),MONTH(TODAY()),DAY(TODAY())),"YYYY")

```


We can codes\ids with particular number increment 


```sh
#Following is the formula to generate codes \ids in 5 rows with starts with 1000 and  increment of 1000
=SEQUENCE(5,1,1000,1000)

#Following is the formula to generate codes \ids in 5 columns with starts with 1001 and  increment of 1000
=SEQUENCE(1,5,1001,1000)
```

We can generate table with random numbers 

```sh
=SEQUENCE(5,5,INT(RAND()*100),INT(RAND()*100))
```

No comments:

Post a Comment