Formula to group values based on above cell?

JumboCactuar

Well-known Member
Joined
Nov 16, 2016
Messages
788
Office Version
  1. 365
Platform
  1. Windows
Hi,
Didn't know how to word the title, I have data in the following format:

00100 | A1A
00101 |

00102 | B6A
00103 | B9H

00302 | A7R
00403
00404

00309 | B8R
00408 | E7S

I need an helper column (C) to fill down the B column values
Example: 00101 = A1A
00403 and 00404 = A7R

There is sometimes spaces between rows

Appreciate any help
 
Last edited:

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
[TABLE="width: 216"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C
[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]100[/TD]
[TD]A1A[/TD]
[TD]A1A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]101[/TD]
[TD][/TD]
[TD]A1A[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]102[/TD]
[TD]B6A[/TD]
[TD]B6A[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]103[/TD]
[TD]B9H[/TD]
[TD]B9H[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]302[/TD]
[TD]A7R[/TD]
[TD]A7R[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]403[/TD]
[TD][/TD]
[TD]A7R[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]404[/TD]
[TD][/TD]
[TD]A7R[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]309[/TD]
[TD]B8R[/TD]
[TD]B8R[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]408[/TD]
[TD]E7S[/TD]
[TD]E7S[/TD]
[/TR]
</tbody>[/TABLE]

Formula in Cell C2: =IF(B2="",C1,B2)
Drag down to the end..... Hope this suffice your requirement.
 
Upvote 0
[TABLE="width: 216"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]100[/TD]
[TD]A1A[/TD]
[TD]A1A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]101[/TD]
[TD][/TD]
[TD]A1A[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]102[/TD]
[TD]B6A[/TD]
[TD]B6A[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]103[/TD]
[TD]B9H[/TD]
[TD]B9H[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]302[/TD]
[TD]A7R[/TD]
[TD]A7R[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]403[/TD]
[TD][/TD]
[TD]A7R[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]404[/TD]
[TD][/TD]
[TD]A7R[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]309[/TD]
[TD]B8R[/TD]
[TD]B8R[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]408[/TD]
[TD]E7S[/TD]
[TD]E7S[/TD]
[/TR]
</tbody>[/TABLE]

Formula in Cell C2: =IF(B2="",C1,B2)
Drag down to the end..... Hope this suffice your requirement.

If there are blank rows this won't work.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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