xlsread function and ranges

조회 수: 15 (최근 30일)
huy ho
huy ho 2019년 4월 20일
답변: Walter Roberson 2019년 4월 20일
data1 = xlsread('data1.xlsx', 'sheet1', 'A1:B48')
my spreadsheet has data for each day of a month (day 1 to day 30) day 1 equals the range A1:B48, day 2 would be A49:B96 etc so the nth term would be 48n - 47 for A and 48n for B where n = day of the month. how can i incorporate the nth term into the xlsread function so that anyone can choose any value of n between 1 and 30 (here i can also use the opportunity to use if statement) and it'll generate the xls read function for that given day? can i even put a formula in for the range in xlsread function?

답변 (1개)

Walter Roberson
Walter Roberson 2019년 4월 20일
"A"+((n-1)*48+1)+":B"+(n*48)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by