OfficeUser
Well-known Member
- Joined
- Feb 4, 2010
- Messages
- 544
- Office Version
- 365
- 2016
- Platform
- Windows
Hopefully I can explain properly, so here goes.
In column A:C I have data in some cells while others are blank.
[TABLE="width: 207"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]Red [/TD]
[TD]Q30[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Green[/TD]
[TD]QX70[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Yellow[/TD]
[TD]QX70[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD]FX50S[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Purple[/TD]
[TD]Q50[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Black[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Gray[/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Teal[/TD]
[TD]QX80[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]Violet[/TD]
[TD][/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD]Tan[/TD]
[TD]Q50[/TD]
[TD="align: right"]9[/TD]
[/TR]
</tbody>[/TABLE]
I am looking for a way to look at the row the blank cell is in, compare the value in C to the one above it, and if the same populate the value in B with the one above it. It would look like this:
[TABLE="width: 207"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]Red [/TD]
[TD]Q30[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Green[/TD]
[TD]QX70[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Yellow[/TD]
[TD]QX70[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD]FX50S[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Purple[/TD]
[TD]Q50[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Black[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Gray[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Teal[/TD]
[TD]QX80[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]Violet[/TD]
[TD][/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD]Tan[/TD]
[TD]Q50[/TD]
[TD="align: right"]9
[/TD]
[/TR]
</tbody>[/TABLE]
If they dont match then it simply stays blank. I would want to do this for rows 1:10000. Any ideas how to do this using a formula or a macro? Thank You!
In column A:C I have data in some cells while others are blank.
[TABLE="width: 207"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]Red [/TD]
[TD]Q30[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Green[/TD]
[TD]QX70[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Yellow[/TD]
[TD]QX70[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD]FX50S[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Purple[/TD]
[TD]Q50[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Black[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Gray[/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Teal[/TD]
[TD]QX80[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]Violet[/TD]
[TD][/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD]Tan[/TD]
[TD]Q50[/TD]
[TD="align: right"]9[/TD]
[/TR]
</tbody>[/TABLE]
I am looking for a way to look at the row the blank cell is in, compare the value in C to the one above it, and if the same populate the value in B with the one above it. It would look like this:
[TABLE="width: 207"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]Red [/TD]
[TD]Q30[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Blue[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Green[/TD]
[TD]QX70[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Yellow[/TD]
[TD]QX70[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD]FX50S[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Purple[/TD]
[TD]Q50[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Black[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Gray[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]FX35[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Teal[/TD]
[TD]QX80[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]Violet[/TD]
[TD][/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD]Tan[/TD]
[TD]Q50[/TD]
[TD="align: right"]9
[/TD]
[/TR]
</tbody>[/TABLE]
If they dont match then it simply stays blank. I would want to do this for rows 1:10000. Any ideas how to do this using a formula or a macro? Thank You!