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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Maybe:
ABC
1Col ACol BCol C
2redstuff
3redstuff
4bluetargettarget
5bluetargettarget
6bluetargettarget
7bluestufftarget
8bluestufftarget
9bluestufftarget
10bluestufftarget
11greenstuff
12greenstuff

<tbody>
</tbody>
Manual

Worksheet Formulas
CellFormula
C2=IF(A2<>A1,IF(B2="target","target",""),IF(OR(B2="target",C1="target"),"target",""))

<tbody>
</tbody>

<tbody>
</tbody>



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,214,983
Messages
6,122,598
Members
449,089
Latest member
Motoracer88

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