{"id":222,"date":"2012-02-07T17:01:11","date_gmt":"2012-02-07T23:01:11","guid":{"rendered":"http:\/\/xlfxs.com\/?p=222"},"modified":"2012-02-07T17:01:11","modified_gmt":"2012-02-07T23:01:11","slug":"worksheetname-and-getworksheetsno-udfs","status":"publish","type":"post","link":"https:\/\/xlfxs.com\/?p=222","title":{"rendered":"WorksheetName and WorksheetsNo UDFs"},"content":{"rendered":"<p>Once you open the sheet and enable macros, you can use function:<\/p>\n<pre>=WorksheetsNo()<\/pre>\n<p>To get total number of sheets in that workbook<\/p>\n<p>And use function:<\/p>\n<pre>=WorksheetName(1)<\/pre>\n<p>To get sheet name for first sheet, and<\/p>\n<p><!--more--><\/p>\n<pre>=WorksheetName(2)<\/pre>\n<p>To get sheet name for second sheet and so on, I used the function Row()-5 in cell B6 to get the 1 and in cell B7 to get the 2<\/p>\n<pre>=WorksheetName(ROW()-5)<\/pre>\n<p>&nbsp;<\/p>\n\n<p>&nbsp;<\/p>\n<div class=\"row\">\n<div class=\"col-lg-6 col-md-6 col-sm-6 text-right\"><a class=\"btn btn-primary btn-lg\" href=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2012\/02\/GetSheets.zip\"><i class=\"fa fa-download\"><\/i> Download spreadsheet<\/a><\/div>\n<div class=\"col-lg-6 col-md-6 col-sm-6\">&nbsp;<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Once you open the sheet and enable macros, you can use function: =WorksheetsNo() To get total number of sheets in that workbook And use function: =WorksheetName(1) To get sheet name for first sheet, and<\/p>\n","protected":false},"author":1,"featured_media":227,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,51,10,12],"tags":[],"class_list":["post-222","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lookup_and_references","category-row","category-udf-user-defined-functions","category-worksheet"],"_links":{"self":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts\/222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=222"}],"version-history":[{"count":0,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts\/222\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/media\/227"}],"wp:attachment":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}