place a number in a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column of numbers with blanks in some cells between the numbered
cells.

In the next column I have done an if/then statement when there is a blank
cell to pull a number above the blank cell but I need a formula to put the
number IN the blank cell.

Any Suggestions?
 
One play ..

Assume source data is in col A, from row1 down
(col A contains data interspersed with "blank" cells)

Put in B1:
=IF(ROW(A1)>COUNT(C:C),"",INDEX(A:A,MATCH(SMALL(C:C,ROW(A1)),C:C,0)))

Put in C1:
=IF(TRIM(A1)="","",ROW())

Select B1:C1, fill down to the last row of data in col A

Col B will extract the data in col A, with all data neatly bunched at the
top (w/o intervening blank cells)
 
Thank You, Max -

Did not quite get desired effect, but maybe based on what you gave me I can
get there.

Best -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top