Formula to autofill values in B with condition from A

bettlejus

New Member
Joined
Apr 4, 2017
Messages
32
Hi,

I cannot figure the formula logic for the following operation:
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]CRT[/TD]
[TD]STATUS[/TD]
[TD]Desired Result[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]P1[/TD]
[TD]P1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD]P1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD]P1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]P2[/TD]
[TD]P2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]P2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]P2[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]P3[/TD]
[TD]P3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD]P3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD]P3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD]P3[/TD]
[/TR]
</tbody>[/TABLE]


I have a count in column A, that is the same untill a value changes in B, like 1..1..1..for P1 and I want a formula that will fill column B to look just like column C, fill the first value untill number in column A changes.

Can you guys help me out?

Thank yoU!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Joe4 has provided a solution.
So has sheetspread.
I wasn't aware that Flash Fill would work on disjoint ranges like that. Good to know, thanks for the tip.
The steps,
- Select B2:B11 for the example given
- Data ribbon tab -> Flash Fill
 
Upvote 0
Thank you Marcelo! Works great!

Well...i thought i was wrong because reviewing your original post it seemed you wanted to fill column B, not column C.
Anyway, you are welcome and thank you for the feedback.

M.
 
Upvote 0
Column C is just to apply the formula, in the end I will replace it with Column B.

Also Flash fill doesn't works, it only works when it has a pattern, like column C in my example, but actually my excel is composed of only column A and column B.

C was just an example so you understand where I am trying to get with the result.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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