ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Looks for Cell Contents & Performs Action (https://www.excelbanter.com/excel-programming/395236-macro-looks-cell-contents-performs-action.html)

watchtower

Macro Looks for Cell Contents & Performs Action
 
I am trying to create a Macro in Excel that looks at the text in each cell in
column A:

-if the cell begins with " D" (three spaces and a D) then I need to cut
the cell and paste it up one row and right one column, then delete the row
from which it came

-if the cell does not begin with " D", then move down one cell

The loop should end when a cell contains "***"

This seems pretty easy, but I'm new to VBA...

Thanks,
Adam

watchtower

Macro Looks for Cell Contents & Performs Action
 
I actually figured it out...

Thanks,
Adam

"watchtower" wrote:

I am trying to create a Macro in Excel that looks at the text in each cell in
column A:

-if the cell begins with " D" (three spaces and a D) then I need to cut
the cell and paste it up one row and right one column, then delete the row
from which it came

-if the cell does not begin with " D", then move down one cell

The loop should end when a cell contains "***"

This seems pretty easy, but I'm new to VBA...

Thanks,
Adam



All times are GMT +1. The time now is 07:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com