if statement using index match

I need to look at the value in snapshot_day, if it matches L1, then return the datavalue of column1, else datevalue of column1 -1/

what is the correct syntax?

K

snapshot_day      Join1            ColumnL1 -       15-Nov
                                                 Results should be
11/15/2015      42323            42323
11/15/2015      42323            42323                  
11/15/2015      42323            42323                  
11/16/2015      42324            42323                  
11/16/2015      42324            42323                  
11/16/2015      42324            42323                  
11/17/2015      42325            42324                  
11/17/2015      42325            42324
Karen SchaeferBI ANALYSTAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
am guessing
K = column 1
L = Join1
M = ColumnL1
N = column where you need the formula

=IF ( K1=L1, L1, M1)

Open in new window

0
Karen SchaeferBI ANALYSTAuthor Commented:
K = kAREN
not column 1
0
Karen SchaeferBI ANALYSTAuthor Commented:
Also need to convert to the datevalue and do a dateadd -1
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Karen SchaeferBI ANALYSTAuthor Commented:
I was trying to use Index Match and a IF statement

or something like this

=IF($H2=$L$1,DATEVALUE($H2),DATEVALUE($H2)-1)
0
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
ok, thanks

and obviously, you have a header row ... so formula would be for row 2, not row 1 anyway!  What are the column letters for your example?
0
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
> "Index Match and a IF statement"

perhaps I am misunderstanding what you want ... could you please explain a bit better -- and maybe attach an example?

thank you
0
Karen SchaeferBI ANALYSTAuthor Commented:
I am trying to look at the date in column1, if = L1(15-Nov), then return the same value as original value 11/15/2015(42323), else subtract the column1 date -1 if date = 11/16/2015 (42324) and return the value of (42323), then convert into a datevalue.

I am attempting to create a unique value by combining the revised datevalue with the another field called FC - results = "ABC42323" or "ABC42324".

Hope this helps.
0
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
> "create a unique value "

aah, that explains why you were considering Index-Match since I see that sometimes you have more than one date.  Hang on, let me wrap my head around this :)
0
NorieVBA ExpertCommented:
Can you attach a sample workbook?
0
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
question ... if all you are doing is trying to create a unique value, how about adding a number or letter to the end?
0
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
I have looked at what you wrote, and tried to figure out what you want ... but I am with Norie on this ... could you please post a sample?

I know it is often hard to describe things -- if we can see what you are after, we can help you better

thank you
0
Karen SchaeferBI ANALYSTAuthor Commented:
here is my solution:  =IF($H2=$L$1,$H2,($H2)-1)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
happy you got it ~ and you're welcome, hope our comments helped you
0
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
out of curiosity, though, you said that you wanted the value to be unique ... but if there are 3 dates, you obviously cannot simply subtract 1 to make it unique ...
0
Karen SchaeferBI ANALYSTAuthor Commented:
Found solution on my own - thanks for the assistance.

K
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.