MrExcel Publishing
Your One Stop for Excel Tips & Solutions

copying cell


Posted by henkka on October 02, 2000 9:42 PM

Hi! problem again im my workbook is three sheets and in each one of them is the column B:B which includes part numbers. if the cell in the first sheet besides part number is blank then copy the cell from sheet3 to first one so that the part number is same

so if sheet1 b3=228855 c3 is blank find same part number from sheet3 and copy cell besides it to sheet1.

same must be done to sheet 2

and if the whole row is blank skip it and goto next row where is data.


Posted by Celia on October 06, 2000 8:24 AM


Henkka
Try the following.

It is assumed that the part numbers on Sheet3 are in B1:B10 and the data in C1:C10 of Sheet3 is to be copied where required to column C on Sheet1.

On Sheet1, select the blank cells in column C (Edit>GoTo>Special>Blanks).
Let's assume that the first blank cell(i.e. the active cell) is C5, so type the following formula and press Ctrl+Enter. If the active cell is not C5, adjust the formula accordingly.

=IF(B5="","",VLOOKUP(B5,Sheet3!B1:C10,2,FALSE))

That's it.

Celia

Posted by celia c on October 06, 2000 8:44 AM

Formula should be :-

=IF(B5="","",VLOOKUP(B5,Sheet3!B$1:C$10,2,FALSE))

Celia