Chạy dữ liệu cho một mã duy nhất

Liên hệ QC
Tôi tuân thủ nội quy khi đăng bài

Huan2705

Thành viên mới
Tham gia
19/7/23
Bài viết
24
Được thích
6
Giới tính
Nam
Hi cả nhà hiện tại em tìm công thức mà bảng số 1 lấy dữ liệu bảng số 2 nhưng mà bảng số 1 chỉ hiện 1 dòng duy nhất như hình bên dưới nhờ ae giúp 1689762055330.png
 

File đính kèm

Dùng pivottable thử coi xem đáp ứng được nhu cầu không
 
Hi cả nhà hiện tại em tìm công thức mà bảng số 1 lấy dữ liệu bảng số 2 nhưng mà bảng số 1 chỉ hiện 1 dòng duy nhất như hình bên dưới nhờ ae giúp View attachment 292895
Gửi Bạn code, 1 triệu dòng tầm 1 giây
Mã:
Sub loctruung()
On Error Resume Next
Range("F3:G17").ClearContents
Dim z57fbbe9a55b7e76e8772bb12c27d0537 As Long, x087a69b2abd16456fad7ad7c0ce23407 As Long, e97b8956a358b260b24afd06d64494c4d As Long, c17fea5c0191a5bc3c2640b8f16b14e98 As Long, ea06f6764676da2a53039a8c582369215 As Long, y701c18a7c7d41871239961947e31b2cd As Long
Dim t19b4198432a9c9fa876d594586433ccb(), ba616620893fa35910376875d0f00bb06()
Dim y33e072adb1d20d06bd55a873572c39c7 As Object
Set y33e072adb1d20d06bd55a873572c39c7 = CreateObject("Scripting.dictionary")
t19b4198432a9c9fa876d594586433ccb = Range("B3:c20").Value
ReDim ba616620893fa35910376875d0f00bb06(1 To UBound(t19b4198432a9c9fa876d594586433ccb), 1 To 2)
Dim z06d4689b191ddc9d8ebcc6a69411ac12(), nfbf29325f773037cde12754c58014411()
For z57fbbe9a55b7e76e8772bb12c27d0537 = 1 To UBound(t19b4198432a9c9fa876d594586433ccb)
If Not y33e072adb1d20d06bd55a873572c39c7.exists(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) Then
Dim w04b52b5882c9fcd0fbd333fd174b0bee(), x745150b7bd58fae7fbbc90d802a5b400()
y701c18a7c7d41871239961947e31b2cd = c17fea5c0191a5bc3c2640b8f16b14e98 + ea06f6764676da2a53039a8c582369215
c17fea5c0191a5bc3c2640b8f16b14e98 = x087a69b2abd16456fad7ad7c0ce23407 + e97b8956a358b260b24afd06d64494c4d
x087a69b2abd16456fad7ad7c0ce23407 = x087a69b2abd16456fad7ad7c0ce23407 + 1
y33e072adb1d20d06bd55a873572c39c7(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) = x087a69b2abd16456fad7ad7c0ce23407
If Not y33e072adb1d20d06bd55a873572c39c7.exists(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) Then
c17fea5c0191a5bc3c2640b8f16b14e98 = ea06f6764676da2a53039a8c582369215 + y701c18a7c7d41871239961947e31b2cd
End If
ba616620893fa35910376875d0f00bb06(x087a69b2abd16456fad7ad7c0ce23407, 1) = t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1): ba616620893fa35910376875d0f00bb06(x087a69b2abd16456fad7ad7c0ce23407, 2) = t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 2)
Else
ea06f6764676da2a53039a8c582369215 = y701c18a7c7d41871239961947e31b2cd + c17fea5c0191a5bc3c2640b8f16b14e98
ea06f6764676da2a53039a8c582369215 = y701c18a7c7d41871239961947e31b2cd + x087a69b2abd16456fad7ad7c0ce23407
e97b8956a358b260b24afd06d64494c4d = y33e072adb1d20d06bd55a873572c39c7.Item(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1))
If Not y33e072adb1d20d06bd55a873572c39c7.exists(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) Then
c17fea5c0191a5bc3c2640b8f16b14e98 = ea06f6764676da2a53039a8c582369215 + y701c18a7c7d41871239961947e31b2cd
End If
ba616620893fa35910376875d0f00bb06(e97b8956a358b260b24afd06d64494c4d, 2) = ba616620893fa35910376875d0f00bb06(e97b8956a358b260b24afd06d64494c4d, 2) + t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 2)
End If
Next
ea06f6764676da2a53039a8c582369215 = x087a69b2abd16456fad7ad7c0ce23407 + e97b8956a358b260b24afd06d64494c4d
y701c18a7c7d41871239961947e31b2cd = c17fea5c0191a5bc3c2640b8f16b14e98 + ea06f6764676da2a53039a8c582369215
If Not y33e072adb1d20d06bd55a873572c39c7.exists(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) Then
c17fea5c0191a5bc3c2640b8f16b14e98 = ea06f6764676da2a53039a8c582369215 + y701c18a7c7d41871239961947e31b2cd
End If
[F3].Resize(x087a69b2abd16456fad7ad7c0ce23407, 2) = ba616620893fa35910376875d0f00bb06
Set y33e072adb1d20d06bd55a873572c39c7 = Nothing
End Sub
 
Gửi Bạn code, 1 triệu dòng tầm 1 giây
Mã:
Sub loctruung()
On Error Resume Next
Range("F3:G17").ClearContents
Dim z57fbbe9a55b7e76e8772bb12c27d0537 As Long, x087a69b2abd16456fad7ad7c0ce23407 As Long, e97b8956a358b260b24afd06d64494c4d As Long, c17fea5c0191a5bc3c2640b8f16b14e98 As Long, ea06f6764676da2a53039a8c582369215 As Long, y701c18a7c7d41871239961947e31b2cd As Long
Dim t19b4198432a9c9fa876d594586433ccb(), ba616620893fa35910376875d0f00bb06()
Dim y33e072adb1d20d06bd55a873572c39c7 As Object
Set y33e072adb1d20d06bd55a873572c39c7 = CreateObject("Scripting.dictionary")
t19b4198432a9c9fa876d594586433ccb = Range("B3:c20").Value
ReDim ba616620893fa35910376875d0f00bb06(1 To UBound(t19b4198432a9c9fa876d594586433ccb), 1 To 2)
Dim z06d4689b191ddc9d8ebcc6a69411ac12(), nfbf29325f773037cde12754c58014411()
For z57fbbe9a55b7e76e8772bb12c27d0537 = 1 To UBound(t19b4198432a9c9fa876d594586433ccb)
If Not y33e072adb1d20d06bd55a873572c39c7.exists(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) Then
Dim w04b52b5882c9fcd0fbd333fd174b0bee(), x745150b7bd58fae7fbbc90d802a5b400()
y701c18a7c7d41871239961947e31b2cd = c17fea5c0191a5bc3c2640b8f16b14e98 + ea06f6764676da2a53039a8c582369215
c17fea5c0191a5bc3c2640b8f16b14e98 = x087a69b2abd16456fad7ad7c0ce23407 + e97b8956a358b260b24afd06d64494c4d
x087a69b2abd16456fad7ad7c0ce23407 = x087a69b2abd16456fad7ad7c0ce23407 + 1
y33e072adb1d20d06bd55a873572c39c7(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) = x087a69b2abd16456fad7ad7c0ce23407
If Not y33e072adb1d20d06bd55a873572c39c7.exists(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) Then
c17fea5c0191a5bc3c2640b8f16b14e98 = ea06f6764676da2a53039a8c582369215 + y701c18a7c7d41871239961947e31b2cd
End If
ba616620893fa35910376875d0f00bb06(x087a69b2abd16456fad7ad7c0ce23407, 1) = t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1): ba616620893fa35910376875d0f00bb06(x087a69b2abd16456fad7ad7c0ce23407, 2) = t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 2)
Else
ea06f6764676da2a53039a8c582369215 = y701c18a7c7d41871239961947e31b2cd + c17fea5c0191a5bc3c2640b8f16b14e98
ea06f6764676da2a53039a8c582369215 = y701c18a7c7d41871239961947e31b2cd + x087a69b2abd16456fad7ad7c0ce23407
e97b8956a358b260b24afd06d64494c4d = y33e072adb1d20d06bd55a873572c39c7.Item(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1))
If Not y33e072adb1d20d06bd55a873572c39c7.exists(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) Then
c17fea5c0191a5bc3c2640b8f16b14e98 = ea06f6764676da2a53039a8c582369215 + y701c18a7c7d41871239961947e31b2cd
End If
ba616620893fa35910376875d0f00bb06(e97b8956a358b260b24afd06d64494c4d, 2) = ba616620893fa35910376875d0f00bb06(e97b8956a358b260b24afd06d64494c4d, 2) + t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 2)
End If
Next
ea06f6764676da2a53039a8c582369215 = x087a69b2abd16456fad7ad7c0ce23407 + e97b8956a358b260b24afd06d64494c4d
y701c18a7c7d41871239961947e31b2cd = c17fea5c0191a5bc3c2640b8f16b14e98 + ea06f6764676da2a53039a8c582369215
If Not y33e072adb1d20d06bd55a873572c39c7.exists(t19b4198432a9c9fa876d594586433ccb(z57fbbe9a55b7e76e8772bb12c27d0537, 1)) Then
c17fea5c0191a5bc3c2640b8f16b14e98 = ea06f6764676da2a53039a8c582369215 + y701c18a7c7d41871239961947e31b2cd
End If
[F3].Resize(x087a69b2abd16456fad7ad7c0ce23407, 2) = ba616620893fa35910376875d0f00bb06
Set y33e072adb1d20d06bd55a873572c39c7 = Nothing
End Sub
trên goodle bạn ơi cảm ơn bạn nhiều
Bài đã được tự động gộp:

Dùng pivottable thử coi xem đáp ứng được nhu cầu không
muốn dùng công thức để chạy á bạn trên google
 
trên goodle bạn ơi cảm ơn bạn nhiều
Bài đã được tự động gộp:


muốn dùng công thức để chạy á bạn trên google
Thử lại đoạn này trong Java xem,
Mã:
package padaone;

import java.sql.*;

public class zappy {

    public static void main(String[] args) {

      
        String connectionUrl = "jdbc:sqlserver://localhost:5000;databasename=GoogleSheetsDSN;user=test;password=test";

       
        Connection con = null;
        Statement stmt = null;
        ResultSet rs = null;

            try {
             
                Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
                con = DriverManager.getConnection(connectionUrl);

             
                String SQL = "SELECT Country , SUM(UnitPrice * Quantity) Total "
                           + "FROM value "
                           + "GROUP BY Country "
                           + "WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json')";
                stmt = con.createStatement();
                rs = stmt.executeQuery(SQL);

               
                while (rs.next()) {
                    System.out.println(rs.getString(1) + " " + rs.getString(2));
                }
            }

      
        catch (Exception e) {
            e.printStackTrace();
        }
        
        finally {
            if (rs != null) try { rs.close(); } catch (Exception e) {}
            if (stmt != null) try { stmt.close(); } catch (Exception e) {}
            if (con != null) try { con.close(); } catch (Exception e) {}
        }
    }
}
 
trên goodle bạn ơi cảm ơn bạn nhiều
muốn dùng công thức để chạy á bạn trên google


Gửi Bạn code, 1 triệu dòng tầm 1 giây
Mã:
Sub loctruung()
On Error Resume Next
Range("F3:G17").ClearContents
Dim z57fbbe9a55b7e76e8772bb12c27d0537 As Long, x087a69b2abd16456fad7ad7c0ce23407 As Long, e97b8956a358b260b24afd06d64494c4d As Long, c17fea5c0191a5bc3c2640b8f16b14e98 As Long, ea06f6764676da2a53039a8c582369215 As Long, y701c18a7c7d41871239961947e31b2cd As Long
Dim t19b4198432a9c9fa876d594586433ccb(), ba616620893fa35910376875d0f00bb06()
Thật tiếc cho 1 nhân tài không được trọng dụng!
 
Web KT

Bài viết mới nhất

Back
Top Bottom