Not sure how to title this, please take a peek.

Hawkmek

New Member
Joined
Apr 29, 2004
Messages
45
Had such good luck this morning I thought I would try again before Happy Hour.

Data will be sorted by column A so all reds, blues, greens, etc will be together. Formulas will be in Column C
Scan Column B for 'target'. When target found populate Column C with target until value in A changes.
Column C is showing desired final product.
I tried figuring this out with Nested IFs and got close but there was always an issue.


--A-------B--------C
red-----stuff---don't care
red-----stuff---don't care
blue----target--target
blue----target--target
blue----target--target
blue----stuff---target
blue----stuff---target
blue----stuff---target
blue----stuff---target
green---stuff---don't care
green---stuff---don't care
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Maybe:
ABC
Col ACol BCol C
redstuff
redstuff
bluetargettarget
bluetargettarget
bluetargettarget
bluestufftarget
bluestufftarget
bluestufftarget
bluestufftarget
greenstuff
greenstuff

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]7[/TD]

[TD="align: center"]8[/TD]

[TD="align: center"]9[/TD]

[TD="align: center"]10[/TD]

[TD="align: center"]11[/TD]

[TD="align: center"]12[/TD]

</tbody>
Manual

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]C2[/TH]
[TD="align: left"]=IF(A2<>A1,IF(B2="target","target",""),IF(OR(B2="target",C1="target"),"target",""))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



seems jtakw came up with a shorter version below.
 
Last edited:
Upvote 0
Hi,

Another way, need an empty or header row on top of your data:


Book1
ABC
1
2redstuffdon't care
3redstuffdon't care
4bluetargettarget
5bluetargettarget
6bluetargettarget
7bluestufftarget
8bluestufftarget
9bluestufftarget
10bluestufftarget
11greenstuffdon't care
12greenstuffdon't care
13purplestuffdon't care
14purpletargettarget
15purplestufftarget
16purplestufftarget
Sheet52
Cell Formulas
RangeFormula
C2=IF(B2="target","target",IF(A2=A1,C1,"don't care"))


Formula copied down.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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