vlookup returning same value

dixonma

New Member
Joined
Jul 26, 2017
Messages
3
So I am trying to do a vlookup stating if tickets are under 30 days old, 30-59 days, 60-89 days, over 90 days old. Due to the source of where we have to pull data from I have had to create a "Days Aged" formula to base this off of =DAYS360(C9,C10) (Column C is my Date created). All my my results are coming back >90? Even the tickets that are only 12 days old. Vlook up table pic below. Formula is =VLOOKUP("[@[Days Aged]]",$A$2:$C$5,3,TRUE). PLEASE HELP I have searched forums for days for answers! :confused: Is it because my vlookup is based on another formula? Is there a better formula to use?
[TABLE="width: 271"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]

Category Min (>=)
[/TD]
[TD]Category Max (<)
[/TD]
[TD]Catergory Name
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]"0"[/TD]
[TD]"-29"[/TD]
[TD]<30[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]"-30"[/TD]
[TD]"-59"[/TD]
[TD]31-60[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]"-60"[/TD]
[TD]"-89"[/TD]
[TD]61-90[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]"-90"[/TD]
[TD]"-1000"[/TD]
[TD]>90[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Days Aged[/TD]
[TD]Ticketid[/TD]
[TD]Datecreated[/TD]
[TD]30/60/90[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD]8/1/2017[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]-357
[/TD]
[TD]17653
[/TD]
[TD]08/04/2016 04:21 PM
[/TD]
[TD]>90
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Your VLookup formula is correct, however what you are trying to do will not work with a VLookup. Within the VLookup formula, the "3", indicates that the formula will only look at what is in the 3rd column, so you will most likely only receive the same answer.

Source for VLookup formula: Excel VLOOKUP Function

Solution: Try using IF Formula Excel IF Function
See formula below(might be missing parenthesis)

=if("[@[Days Aged]]"<30,"<30",if(and("[@[Days Aged]]">=31,"[@[Days Aged]]"<30),"31-60",if(and("[@[Days Aged]]">=61,"[@[Days Aged]]<90),"61-90",">90")))
 
Upvote 0
Finally got this resolved. I had to multiple my negative values by -1 to give me positive values. Then I used the nested if function below. Hope this helps someone else.
=IF(AND(B10>0,B10<30),30,IF(AND(B10>29,B10<60),60,IF(AND(B10>59,B10<90),90,IF(B10>89,90,0))))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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