[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
Solved

# IF with timestamp

Posted on 2013-11-29
Medium Priority
194 Views
=IF(LEFT(B3,5)="Slide","",IF(RIGHT(B3,3)=time,"","Action"))

Im trying to ignore a row if it has a timestamp, my if above gives a #name error, can anyone advise how i could do this?

Thanks
0
Question by:Seamus2626
• 3
• 2
• 2

LVL 11

Expert Comment

ID: 39685401
Can you post a sample of the workbook and list the desired action?  Should be relatively simple.

Sean
0

LVL 43

Expert Comment

ID: 39685403
What is the result of

right(B3,3)
0

Author Comment

ID: 39685448
04/11/2013  13:27:18

Thats the stamp

Result = 625
0

LVL 11

Accepted Solution

SeanStrickland earned 2000 total points
ID: 39685463
If a time stamp does not exist in B3, what does?

If it's text or a blank cell, you can use this:
=IF(LEFT(B3,5)="Slide","",IF(AND(ISNUMBER(B3),B3>0),"","Action"))

or, more simply: (this would ignore blanks and text whereas the one above ignores negative values)

=IF(LEFT(B3,5)="Slide","",IF(ISNUMBER(B3),"","Action"))
0

Author Closing Comment

ID: 39685482
Perfect
0

LVL 43

Expert Comment

ID: 39685496
I think this code will fail if the cell contains a numeric entry which is not a timestamp.
0

LVL 11

Expert Comment

ID: 39685594
Depends on your necessary usage.  Often times, you wouldn't use a column of data that's intended for a timestamp for anything more than a numerical timestamp, a blank cell, or maybe some descriptive text if it's a really simple spreadsheet.

Agreed, though - if you have a multi-functional column that contains a "value" field and you're using some sort of descriptor to differentiate it at a row-level, the code may fail.

Sean
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
###### Suggested Courses
Course of the Month20 days, left to enroll