powerquery automation

Power Query Insert Blank Row Automatically After Changed Rows in Excel

minbe-data 2026. 4. 6. 12:27

 

 

When working with Excel data, you may need to insert a blank row after specific rows such as "Changed" records.

In many cases like construction reports or management logs, data is structured as "Original / Changed".
To improve readability, a blank row is often required after each changed row.

However, doing this manually takes time and needs to be repeated whenever new data is added.

This example shows how to use Power Query to automatically detect changed rows and insert blank rows below them.

## Workflow

1. Load data into Power Query  
2. Detect changed rows automatically  
3. Insert blank rows below changed rows  
4. Refresh to update results automatically  

## Result

Whenever new data is added, simply refresh the query.

- Changed rows are detected automatically  
- Blank rows are inserted automatically  
- Data structure is maintained without manual work  

## Use Case

This method is useful for:

- Construction reports  
- Management logs  
- Original vs Changed data structures  

Power Query를 활용해 엑셀 데이터에서 변경 행 아래에 빈 행을 자동으로 삽입하는 방법을 정리했습니다.

공사 내역서나 관리 대장처럼 ‘당초 / 변경’ 구조로 데이터를 관리하는 경우, 변경 행 아래에 구분을 위한 빈 행을 추가해야 하는 상황이 자주 발생합니다. 하지만 수작업으로 정리하면 시간이 많이 소요되고, 데이터가 추가될 때마다 반복 작업이 필요합니다.

Power Query를 활용하면 이러한 작업을 자동으로 처리할 수 있습니다.

데이터를 입력한 뒤 새로고침만 하면 변경 행을 자동으로 인식하고, 해당 행 아래에 빈 행을 삽입하여 구조를 정리해줍니다. 따라서 별도의 수작업 없이도 항상 동일한 형태의 데이터 구조를 유지할 수 있습니다.

이번 예제에서는 다음과 같은 기능을 구현했습니다.

- 변경 행 자동 인식  
- 변경 행 아래 빈 행 자동 삽입  
- 데이터 추가 후 Refresh 시 자동 업데이트  

특히 공사 내역서나 관리 대장처럼 구조가 중요한 데이터에서 매우 유용하게 활용할 수 있습니다.

Power Query를 활용하면 엑셀 데이터를 반복 작업 없이 자동으로 정리할 수 있으며, 실무에서 효율성을 크게 높일 수 있습니다.

Power Query, M code, 엑셀 자동화 관련 실전 예제를 계속 공유할 예정입니다.

 

videolink - https://youtu.be/jHgRPOHiLmU

 

Download the sample file below.

You can download the zip file in [자료실][Download] page

The file name is 25.자동문자분류(category value)

Use the English M code provided for your dataset.

✔ Download the ready-to-use Power Query template below  
✔ Just copy and paste the M code – works instantly

 

Eng_m code.txt
0.00MB



The original sample file is based on a Korean dataset.
You can apply the English M code to adapt it to your own data.

 

--------------------------------

Need a custom automation for your Excel workflow?

I can build a tailored solution based on your data.

✔ Used in real-world business automation  
✔ Saves hours of manual work

minbedata@gmail.com

You can pay via PayPal.

You can also contact me via Upwork for secure payment and project handling.

 

<a href="https://www.upwork.com/freelancers/~01eb52dbd212cffc17" target="_blank">
Hire me on Upwork
</a>

You don't worry about conversing with me.

My Major is an English literature, so I can speak English fluently and read, listening, writing proficiently

korean version web address (한국버전) is 

<a href="https://blog.naver.com/minbe-data" target="_blank">네이버 블로그 바로가기</a>