Adding text to a column based on value in another column

exceluser29

New Member
Joined
Sep 8, 2010
Messages
10
Hi,

I have two tables in hand:
Table 1: has data showing Customer no, Renewal Month, last_active_date, report_pull_dt and other columns.

Table 2: has Renewal Month and Cancel Dt Limit

What I have to do is add a column in table 1 (Status) based on their last_active_date .

For example, If renewal Month is July and last_active_date < Cancel Dt Limit, then status = 'cancel' else 'Active'.

I will have to lookup the Cancel Dt Limit from table 2, based on their renewal month.

Can someone please help? I was thinking a combination of Vlookup and if statement but dont know how to write!

Thanks!
 
Perhaps (if I've understood):

Excel Workbook
ABCDE
1Customer NoRenewal MonthLast Active DateReport Pull DateCustStat
21Jan15-Jul-1020-Jul-10Active
32Feb13-Jun-1020-Jul-10Active
43May13-Jun-1020-Jul-10Cancel
54Nov13-Jun-1020-Jul-10Active
Sheet1


Note: given the rule re: 2 months - the above is no longer using the reference table (the date logic is built into the formula directly)
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Thanks for your reply! I tried the formula in my sheet but for some reason, it is giving me 'Active' for all cells. I am not getting 'Cancel' for cases like you have in row4. Any suggestions? what am I doing wrong?
 
Upvote 0
Are the values in Col C really date values - ie not text strings ... ?

What does

=COUNT(Sheet1!C:C)

return (adjust references accordingly per your real file)
 
Upvote 0
OK this means the values in C are dates stored as text and text > number

Assuming you don't want to adjust the original values (you can if you want to) you can try coercing the values in the formula:

=IF(OR(MONTH(1&$B2)>MONTH($D2),($C2+0)>DATE(YEAR(TODAY()),MONTH(1&$B2)+2,15)),"Active","Cancel")

the change above is that we add 0 to C2 - the act of addition coerces the string to number - if the date strings are invalid the above will generate #VALUE! errors.
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,271
Members
449,219
Latest member
daynle

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