cancel
Showing results for
Did you mean:
Frequent Visitor

## How to fill a range of cells in excel at once with one particular value?

[Power Automate Desktop] Without using a loop, how can I fill a range of cells in excel with one particular value?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution Sage

Hi @reginaldbal
This sequence is not beautiful by any means but it works.
Suppose you want to fill A1 to A6 with value A:
1. 'Launch Excel' with a blank sheet
2. 'Write to Excel worksheet' write in A1 (row=1, column=1) the value A
3. 'Copy cells from Excel worksheet' copy cell A1 (row=1, column=1)
4. 'Select cells in Excel worksheet': select the remaining range you want to fill. In our example it's A2 to A6 (row=2, column=1 to row=6, column=1)
5. 'Focus window', class= XLMAIN (in order to use send keys properly)
6. 'Send keys' {LControlKey}({V}) (this sends Ctrl+V)

Solution Sage

Hi @reginaldbal
This sequence is not beautiful by any means but it works.
Suppose you want to fill A1 to A6 with value A:
1. 'Launch Excel' with a blank sheet
2. 'Write to Excel worksheet' write in A1 (row=1, column=1) the value A
3. 'Copy cells from Excel worksheet' copy cell A1 (row=1, column=1)
4. 'Select cells in Excel worksheet': select the remaining range you want to fill. In our example it's A2 to A6 (row=2, column=1 to row=6, column=1)
5. 'Focus window', class= XLMAIN (in order to use send keys properly)
6. 'Send keys' {LControlKey}({V}) (this sends Ctrl+V)

Announcements

#### Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

#### Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

#### We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.