LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Automated cell copy depending on cell content?

Hi,

Specifically, I'm looking for a macro that does the following:

For a selected column
For any cell in this column
if (the current cell is not empty) and
(the cell above the current cell is empty) and
(the cell below the current cell is empty)
then
copy the content of the current cell into the cell below
(alternatively, into the cell at the right).

The column A below should become column B after applying the macro.

Col. A Col.B
<empty <empty
<empty <empty
one one
<empty one
<empty <empty
<empty <empty
two <two
three <three
<empty <empty
<empty <empty
four <four
<empty <four

This should be pretty straight-forward but I am totally unaware of the
VB syntax. Thanks in advance,

Best regards
--Joachim




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I copy a row depending on the content of a cell in the row Robert59 Excel Worksheet Functions 2 October 19th 07 06:26 PM
Sum data, depending on cell content Mik Excel Worksheet Functions 6 October 18th 07 04:30 PM
how do i change cell background colour depending on its content? demble Excel Discussion (Misc queries) 2 May 2nd 07 05:50 PM
Copy content of cell to another depending on value of third cell(between worksheets) Zeljko Milak Excel Worksheet Functions 2 July 14th 06 07:17 PM
autowrite a cell depending on another cell's content jose carreno Excel Programming 2 October 1st 03 05:50 PM


All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"