Trang 1 của 2 12 CuốiCuối
Kết quả 1 đến 10 của 13

Chủ đề: cách tạo một lần ra nhiều sheets giống với sheet ban đầu

  1. #1
    Ngày tham gia
    Aug 2015
    Bài viết
    0
    Trích dẫn Gửi bởi thang 2010
    Em cảm ơn nhe!

    anh có thể giúp em thêm chút nữa nhé!

    anh làm giúp em sao cho tên sheet từ 1-100 nhảy tương ứng vào ô J6 từ sheet 1-100
    Code cùi:
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shCore.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shAutoloader.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushAppleScript.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushAS3.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushBash.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushColdFusion.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCpp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCSharp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCss.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushDelphi.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushDiff.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushErlang.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushGroovy.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJava.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJavaFx.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJScript.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPerl.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPhp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPlain.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPowerShell.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPython.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushRuby.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushSass.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushScala.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushSql.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushVb.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushXml.js"></script>

    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shAutoloader.js"></script>

    <link type="text/css" rel="stylesheet" href="/forum/vctinh_xcode/styles/shCoreDefault.css">
    <link type="text/css" rel="Stylesheet" href="/forum/vctinh_xcode/styles/shThemeDefault.css">

    <pre class="brush: vb; toolbar: false;">Sub Dienso()
    Dim Ws As Worksheet
    For Each Ws In Worksheets
    Sheets("" & Ws.Name & "").[J6] = "=" & Ws.Name & ""
    Next
    End Sub
    </pre>

    <script type="text/javascript">
    function path()
    {
    var args = arguments,
    result = []
    ;

    for(var i = 0; i < args.length; i++)
    result.push(args[i].replace('@', '/forum/vctinh_xcode/scripts/'));
    return result;
    };

    SyntaxHighlighter.autoloader.apply(null, path(
    'applescript @shBrushAppleScript.js',
    'actionscript3 as3 @shBrushAS3.js',
    'ahk autohotkey @shBrushAhk.js',
    'asm x86 @shBrushAsm.js',
    'bash shell @shBrushBash.js',
    'coldfusion cf @shBrushColdFusion.js',
    'cpp c @shBrushCpp.js',
    'c# c-sharp csharp @shBrushCSharp.js',
    'css @shBrushCss.js',
    'delphi pascal @shBrushDelphi.js',
    'diff patch pas @shBrushDiff.js',
    'erl erlang @shBrushErlang.js',
    'groovy @shBrushGroovy.js',
    'java @shBrushJava.js',
    'jfx javafx @shBrushJavaFX.js',
    'js jscript javascript @shBrushJScript.js',
    'perl pl @shBrushPerl.js',
    'php @shBrushPhp.js',
    'text plain @shBrushPlain.js',
    'py python @shBrushPython.js',
    'ruby rails ror rb @shBrushRuby.js',
    'sass scss @shBrushSass.js',
    'scala @shBrushScala.js',
    'sql SQL @shBrushSql.js',
    'vb vbnet vba @shBrushVb.js',
    'xml xhtml xslt html @shBrushXml.js'
    ));
    SyntaxHighlighter.config.stripBrs = true;
    SyntaxHighlighter.all();
    </script>

  2. #2
    anhvanit Guest
    Trích dẫn Gửi bởi hung2412
    Code cùi:
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shCore.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shAutoloader.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushAppleScript.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushAS3.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushBash.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushColdFusion.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCpp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCSharp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCss.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushDelphi.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushDiff.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushErlang.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushGroovy.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJava.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJavaFx.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJScript.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPerl.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPhp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPlain.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPowerShell.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPython.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushRuby.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushSass.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushScala.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushSql.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushVb.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushXml.js"></script>

    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shAutoloader.js"></script>

    <link type="text/css" rel="stylesheet" href="/forum/vctinh_xcode/styles/shCoreDefault.css">
    <link type="text/css" rel="Stylesheet" href="/forum/vctinh_xcode/styles/shThemeDefault.css">

    <pre class="brush: vb; toolbar: false;">Sub Dienso()
    Dim Ws As Worksheet
    For Each Ws In Worksheets
    Sheets("" & Ws.Name & "").[J6] = "=" & Ws.Name & ""
    Next
    End Sub
    </pre>

    <script type="text/javascript">
    function path()
    {
    var args = arguments,
    result = []
    ;

    for(var i = 0; i < args.length; i++)
    result.push(args[i].replace('@', '/forum/vctinh_xcode/scripts/'));
    return result;
    };

    SyntaxHighlighter.autoloader.apply(null, path(
    'applescript @shBrushAppleScript.js',
    'actionscript3 as3 @shBrushAS3.js',
    'ahk autohotkey @shBrushAhk.js',
    'asm x86 @shBrushAsm.js',
    'bash shell @shBrushBash.js',
    'coldfusion cf @shBrushColdFusion.js',
    'cpp c @shBrushCpp.js',
    'c# c-sharp csharp @shBrushCSharp.js',
    'css @shBrushCss.js',
    'delphi pascal @shBrushDelphi.js',
    'diff patch pas @shBrushDiff.js',
    'erl erlang @shBrushErlang.js',
    'groovy @shBrushGroovy.js',
    'java @shBrushJava.js',
    'jfx javafx @shBrushJavaFX.js',
    'js jscript javascript @shBrushJScript.js',
    'perl pl @shBrushPerl.js',
    'php @shBrushPhp.js',
    'text plain @shBrushPlain.js',
    'py python @shBrushPython.js',
    'ruby rails ror rb @shBrushRuby.js',
    'sass scss @shBrushSass.js',
    'scala @shBrushScala.js',
    'sql SQL @shBrushSql.js',
    'vb vbnet vba @shBrushVb.js',
    'xml xhtml xslt html @shBrushXml.js'
    ));
    SyntaxHighlighter.config.stripBrs = true;
    SyntaxHighlighter.all();
    </script>
    Anh cho em hỏi ké xíu. Nếu muốn giá trị J6 ở trên bằng tên của file thì làm sao ạ

  3. #3
    kevin_cn08b Guest
    Trích dẫn Gửi bởi giangleloi
    Anh cho em hỏi ké xíu. Nếu muốn giá trị J6 ở trên bằng tên của file thì làm sao ạ
    Ý bạn muốn là: Nếu tên File là Tai khoan.xls thì giá trị ở ô J6 là Tai khoan hả?

  4. #4
    tuyenco1011 Guest
    Trích dẫn Gửi bởi hung2412
    Ý bạn muốn là: Nếu tên File là Tai khoan.xls thì giá trị ở ô J6 là Tai khoan hả?
    Đúng rồi đó anh. Có cách nào làm được không anh

  5. #5
    huutrangqb Guest
    Trích dẫn Gửi bởi giangleloi
    Đúng rồi đó anh. Có cách nào làm được không anh
    Vậy bạn xài Code cùi này:
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shCore.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shAutoloader.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushAppleScript.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushAS3.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushBash.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushColdFusion.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCpp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCSharp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCss.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushDelphi.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushDiff.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushErlang.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushGroovy.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJava.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJavaFx.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJScript.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPerl.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPhp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPlain.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPowerShell.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPython.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushRuby.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushSass.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushScala.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushSql.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushVb.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushXml.js"></script>

    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shAutoloader.js"></script>

    <link type="text/css" rel="stylesheet" href="/forum/vctinh_xcode/styles/shCoreDefault.css">
    <link type="text/css" rel="Stylesheet" href="/forum/vctinh_xcode/styles/shThemeDefault.css">

    <pre class="brush: vb; toolbar: false;">Sub TimtenFile()
    Dim Wb As Workbook
    Set Wb = ThisWorkbook
    [J6] = "" & Wb.Name & """"
    End Sub</pre>

    <script type="text/javascript">
    function path()
    {
    var args = arguments,
    result = []
    ;

    for(var i = 0; i < args.length; i++)
    result.push(args[i].replace('@', '/forum/vctinh_xcode/scripts/'));
    return result;
    };

    SyntaxHighlighter.autoloader.apply(null, path(
    'applescript @shBrushAppleScript.js',
    'actionscript3 as3 @shBrushAS3.js',
    'ahk autohotkey @shBrushAhk.js',
    'asm x86 @shBrushAsm.js',
    'bash shell @shBrushBash.js',
    'coldfusion cf @shBrushColdFusion.js',
    'cpp c @shBrushCpp.js',
    'c# c-sharp csharp @shBrushCSharp.js',
    'css @shBrushCss.js',
    'delphi pascal @shBrushDelphi.js',
    'diff patch pas @shBrushDiff.js',
    'erl erlang @shBrushErlang.js',
    'groovy @shBrushGroovy.js',
    'java @shBrushJava.js',
    'jfx javafx @shBrushJavaFX.js',
    'js jscript javascript @shBrushJScript.js',
    'perl pl @shBrushPerl.js',
    'php @shBrushPhp.js',
    'text plain @shBrushPlain.js',
    'py python @shBrushPython.js',
    'ruby rails ror rb @shBrushRuby.js',
    'sass scss @shBrushSass.js',
    'scala @shBrushScala.js',
    'sql SQL @shBrushSql.js',
    'vb vbnet vba @shBrushVb.js',
    'xml xhtml xslt html @shBrushXml.js'
    ));
    SyntaxHighlighter.config.stripBrs = true;
    SyntaxHighlighter.all();
    </script>

  6. #6
    Mrhieuson Guest
    Trích dẫn Gửi bởi hung2412
    Vậy bạn xài Code cùi này:
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shCore.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shAutoloader.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushAppleScript.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushAS3.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushBash.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushColdFusion.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCpp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCSharp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushCss.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushDelphi.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushDiff.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushErlang.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushGroovy.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJava.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJavaFx.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushJScript.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPerl.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPhp.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPlain.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPowerShell.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushPython.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushRuby.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushSass.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushScala.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushSql.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushVb.js"></script>
    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shBrushXml.js"></script>

    <script type="text/javascript" src="/forum/vctinh_xcode/scripts/shAutoloader.js"></script>

    <link type="text/css" rel="stylesheet" href="/forum/vctinh_xcode/styles/shCoreDefault.css">
    <link type="text/css" rel="Stylesheet" href="/forum/vctinh_xcode/styles/shThemeDefault.css">

    <pre class="brush: vb; toolbar: false;">Sub TimtenFile()
    Dim Wb As Workbook
    Set Wb = ThisWorkbook
    [J6] = "" & Wb.Name & """"
    End Sub</pre>

    <script type="text/javascript">
    function path()
    {
    var args = arguments,
    result = []
    ;

    for(var i = 0; i < args.length; i++)
    result.push(args[i].replace('@', '/forum/vctinh_xcode/scripts/'));
    return result;
    };

    SyntaxHighlighter.autoloader.apply(null, path(
    'applescript @shBrushAppleScript.js',
    'actionscript3 as3 @shBrushAS3.js',
    'ahk autohotkey @shBrushAhk.js',
    'asm x86 @shBrushAsm.js',
    'bash shell @shBrushBash.js',
    'coldfusion cf @shBrushColdFusion.js',
    'cpp c @shBrushCpp.js',
    'c# c-sharp csharp @shBrushCSharp.js',
    'css @shBrushCss.js',
    'delphi pascal @shBrushDelphi.js',
    'diff patch pas @shBrushDiff.js',
    'erl erlang @shBrushErlang.js',
    'groovy @shBrushGroovy.js',
    'java @shBrushJava.js',
    'jfx javafx @shBrushJavaFX.js',
    'js jscript javascript @shBrushJScript.js',
    'perl pl @shBrushPerl.js',
    'php @shBrushPhp.js',
    'text plain @shBrushPlain.js',
    'py python @shBrushPython.js',
    'ruby rails ror rb @shBrushRuby.js',
    'sass scss @shBrushSass.js',
    'scala @shBrushScala.js',
    'sql SQL @shBrushSql.js',
    'vb vbnet vba @shBrushVb.js',
    'xml xhtml xslt html @shBrushXml.js'
    ));
    SyntaxHighlighter.config.stripBrs = true;
    SyntaxHighlighter.all();
    </script>
    Khác nhau ở chỗ cái dấu bằng. Hic hic. Cám ơn bạn nhiều test ok rồi. Sáng có post bài hỏi về vụ này mà không biết hỏi làm sao. May nhờ có topic này mới biết hỏi. hihi

  7. #7
    Mr_Dam Guest
    Cũng câu hỏi đó nhưng lưu bằng tên của folder chứa file excel đó được không bạn nhỉ

  8. #8
    Ngày tham gia
    Aug 2015
    Bài viết
    0
    Trích dẫn Gửi bởi giangleloi
    Cũng câu hỏi đó nhưng lưu bằng tên của folder chứa file excel đó được không bạn nhỉ
    Cái này thì tôi không đủ trình (Có vẻ càng ngày càng xa đề tài này rồi, bạn nên mở một đề tài mới thì tốt hơn).

  9. #9
    rinkatori Guest

    cách tạo một lần ra nhiều sheets giống với sheet ban đầu

    chào các anh chị :

    anh chị giúp em ca này với :

    e, có 1file trong đó có 1sheet em tạo ra , bây giờ em muốn làm 1 lần 100sheet giống

    như sheet ban đầu em tạo ra

  10. #10
    nguyenhungcase Guest
    Tôi đã viết code tạo thêm cho bạn từ sheet 2 đến sheet 100
    để chạy code này, gõ Alt - T8, chọn Macro1, chọn Run

    Nếu chạy 2 lần thì lỗi đó.

    Do file có code nên đuôi là xlsm

    Có thể mở để xem. Mã rất đơn giản

    Sub Macro1()
    For i = 2 To 100
    Sheets("1").Copy After:=Sheets(i - 1)
    ActiveSheet.Name = i
    Next
    End Sub

    Nếu máy của bạn không hiện được code thì tìm tiếp trên GPE cách để mở được Macro

Trang 1 của 2 12 CuốiCuối

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •