ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help Needed (https://www.excelbanter.com/excel-discussion-misc-queries/447426-help-needed.html)

AshKhan

Help Needed
 
i need help with something that looks simple but i cant for the life of me work it out

In cells E10 i want to input a date e.g 01/02/12
i want the worksheet to automatically work out
what target i have hit in cell G10

my targets are
13 weeks
26 week
39 week
52 week
52+

i want the cell G10 to populate the content into one of the 5 targets based on the date i put in

so if i input

01/02/12 cell G10 should automatically have text entered "39 Week"

i also want the formula to work in all cells E10 and G10 onwards

jack_n_bub

Quote:

Originally Posted by AshKhan (Post 1606500)
i need help with something that looks simple but i cant for the life of me work it out

In cells E10 i want to input a date e.g 01/02/12
i want the worksheet to automatically work out
what target i have hit in cell G10

my targets are
13 weeks
26 week
39 week
52 week
52+

i want the cell G10 to populate the content into one of the 5 targets based on the date i put in

so if i input

01/02/12 cell G10 should automatically have text entered "39 Week"

i also want the formula to work in all cells E10 and G10 onwards

Hi,

I would recommend an easy VBA function for this purpose but if you are looking for something in Excel, here is a formula that works for this situation.

=IF(INT((TODAY()-A2)/7)<=13,"13 Weeks",IF(INT((TODAY()-A2)/7)<=26,"26 Weeks",IF(INT((TODAY()-A2)/7)<=39,"39 Weeks",IF(INT((TODAY()-A2)/7)<=52,"52 Weeks","52+ Weeks"))))

This formula assumes that your date is in Cell A2.

Please let me know if this works for you.

Prashant


All times are GMT +1. The time now is 10:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com