How To Fill Blanks

jamiguel77

Active Member
Joined
Feb 14, 2006
Messages
387
Office Version
  1. 2016
  2. 2010
  3. 2007
Platform
  1. Windows
  2. Web
InvoiceSerialPediment
110CAAA
110CAAA
110CAAA
110CAAA
110C
110C
110C
110C
110C
111B
111B
112GCCC
112GCCC
112GCCC
112G
112G
112G
112G


the result spected is:

InvoiceSerialPediment
110CAAA
110CAAA
110CAAA
110CAAA
110CAAA
110CAAA
110CAAA
110CAAA
110CAAA
111B
111B
112GCCC
112GCCC
112GCCC
112GCCC
112GCCC
112GCCC
112GCCC


note: row 11 and 12
not filled because in column C is empty

thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I have assumed that you are looking for a vba approach and would not use the code unless there were blank cells in column C.
Test with a copy of your worksheet.

VBA Code:
Sub Fill_Empty()
  With Range("C2:C" & Range("A" & Rows.Count).End(xlUp).Row)
    .SpecialCells(xlBlanks).FormulaR1C1 = "=IF(AND(RC[-1]=R[-1]C[-1],R[-1]C<>""""),R[-1]C,"""")"
    .Value = .Value
  End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top