Path: news.mathworks.com!not-for-mail
From: "Phil Goddard" <phil@goddardconsulting.ca>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to Select Entire Row From Excel File Uisng Prompt?
Date: Mon, 19 Nov 2012 22:41:17 +0000 (UTC)
Organization: Goddard Consulting
Lines: 14
Message-ID: <k8ecid$eop$1@newscl01ah.mathworks.com>
References: <k899g1$cb2$1@newscl01ah.mathworks.com> <k8b90m$4g8$1@newscl01ah.mathworks.com> <k8bt7h$8r3$1@newscl01ah.mathworks.com> <k8c9se$iqk$1@newscl01ah.mathworks.com> <k8dbrr$7d3$1@newscl01ah.mathworks.com>
Reply-To: "Phil Goddard" <phil@goddardconsulting.ca>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1353364877 15129 172.30.248.46 (19 Nov 2012 22:41:17 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 19 Nov 2012 22:41:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 26433
Xref: news.mathworks.com comp.soft-sys.matlab:783106

You need to do error checking, and I am assuming your file is as per one of your previous posts whether the first column is read in as integer numbers (which can be interpreted as dates):

requireDateNumber = %whatever your user enters

data = xlsread('myfile.xls');
rowIndex = (data(:,1) == requiredDateNumber);

if any(rowIndex)
  rowData = data(rowIndex,2:end);
else
  error('There is no corresponding row.');
end

Phil.