Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other?
A deadline beckons, and help with regard to the following would be greatly
appreciated. I have an eight-column Excel (for Mac, but don't think that matters) sheet (columns "A" -"H") and am trying to write a macro that will look down the cells in Column "H" (about 10,000 rows of data) and upon finding an empty cell, copy the contents (text) from the cell directly above it IF: --the "target" cell is empty; AND --the value of the corresponding cells over in column "D" equal each other. In other words, IF: in Column "D" Rows 26 and 27 both have a value of, e.g., "Smith"; AND in Column "H", Row 26 has a value of "Judge12", and Row 27 is empty, the macro should copy "Judge 12" from Row 26 to Row 27 in Column "H" Steven Rosenberg : ) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other?
Do you require a macro?
You can do this by 1. selecting column H, then Edit/Goto/Special and select Blanks. 2. Let's say the first blank cell is in H83. In that cell write the formula =IF(D83=D82,H82,""). 3. Press CTRL+ENTER to put this formula in all of the selected cells. 4. To these convert these formulas to their values, Edit/Copy column H (all of the cells, not just the blanks), then -- without changing the selection -- Edit/Paste Special and select the Values option. On Mon, 4 Aug 2003 21:20:31 -0400, "Tom Ogilvy" wrote: See one possible answer to your second posting of this question. Regards, Tom Ogilvy SROSENYC wrote in message ... A deadline beckons, and help with regard to the following would be greatly appreciated. I have an eight-column Excel (for Mac, but don't think that matters) sheet (columns "A" -"H") and am trying to write a macro that will look down the cells in Column "H" (about 10,000 rows of data) and upon finding an empty cell, copy the contents (text) from the cell directly above it IF: --the "target" cell is empty; AND --the value of the corresponding cells over in column "D" equal each other. In other words, IF: in Column "D" Rows 26 and 27 both have a value of, e.g., "Smith"; AND in Column "H", Row 26 has a value of "Judge12", and Row 27 is empty, the macro should copy "Judge 12" from Row 26 to Row 27 in Column "H" Steven Rosenberg : ) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find last cell in column then SUM in cell directly below | Excel Worksheet Functions | |||
Macro Request: Fill in empty cells with previous Filled cell in column | Excel Worksheet Functions | |||
How to copy data to the next empty cell in a column | Excel Worksheet Functions | |||
Copy from row above if cell is empty in column | Excel Discussion (Misc queries) | |||
Copy a string text to cell if another cell not empty | Excel Discussion (Misc queries) |