Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling in a column

Status
Not open for further replies.

spciesla

Mechanical
Jul 23, 2003
140
I received a spreadsheet that has data from numerous motors. The motor ID is in 1 cell in column C. There are anywhere between 6 and 20 rows of data associated with the motor ID. I would like to fill in the blank cells in column C as shown below (Current versus Desired). How can I do this without copying and pasting one section at a time?

Current:
Motor 1 Data
blank Data
blank Data
Motor 2 Data
blank Data
etc

Desired:
Motor 1 Data
Motor 1 Data
Motor 1 Data
Motor 2 Data
Motor 2 Data
 
Replies continue below

Recommended for you

Never mind - I figured it out. Doht!!!
 
How did you do it? I've wondered the same thing before.
 
I copied the motor names to an adjacent column, so columns B & C looked like:

B C
1 Motor1 Motor1
2 blank blank
3 blank blank
4 blank blank
5 Motor2 Motor2
6 blank blank
7 blank blank
8 blank blank
9 Motor3 Motor3

I entered the following formula in B2, '=IF(C2="",B1,C2)',
which corresponds to, if C2 is blank, copy the data from B1. If C2 insn't blank, leave it alone. I copied the formula to the rest of column B, and then copied/paste special (value) to column C. Then I deleted column B.

Easier to do than to type.
 
You can simply grab the bottom right corner of the cell (the cursor will turn into cross hairs) and drag to fill the blank cells. Another way is to double-click on the lower right corner of the cell (once the cursor is cross hairs).

The only caveat is that if you only have 1 cell filled with data, Excel will try to guess what you want to autofill the remaining cells with, and I believe it defaults to incrementing. The way around this is to have 2 sequential cells with the same value, select both cells, and then double click the lower right portion of the cell.

Hope that helps!
 
why not just copy 'Motor 1' cell and paste it where you need to? You can select a group of cells and paste it to all of them at once. Three copy and paste commands (according to the info that you posted). You will have to copy and paste the formula for each grouping anyway so why waste the time on a formula?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor