0

我需要使用 VBA 将这些数据与 Excel 中的行对齐。我有大量这种格式的数据。我需要把它排成行

SUBSCRIBER DETAILS
IMSI             MSISDN           STATE
405845001382775  919085919027     IDLE

DATE             TIME             CELLID
130103           122725           404-29-12906-15353

IMEI
356395024630200

SUBSCRIBER DETAILS
IMSI             MSISDN           STATE
405845002463183  919085325090     IDET

DATE             TIME             CELLID
130103           103447           404-29-12107-23993

IMEI
354917031429730

所需输出:-

IMSI        MSISDN           STATE  DATE             TIME             CELLID            DATE             TIME             CELLID            IMEI
405845001382775  919085919027     IDLE              130103           122725           404-29-12906-15353            356395024630200
IMSI             MSISDN           STATE DATE             TIME             CELLID            DATE             TIME             CELLID            IMEI
405845002463183  919085325090     IDET              130103           103447           404-29-12107-23993            354917031429730
4

1 回答 1

0

这是您正在寻找的部分。选择范围后根据需要使用。每种对齐方式都与“With 语句”一起使用

With Selection
    .HorizontalAlignment = xlLeft
    .HorizontalAlignment = xlCenter
    .HorizontalAlignment = xlRight
    .VerticalAlignment = xlTop
    .VerticalAlignment = xlCenter
    .VerticalAlignment = xlBottom
End With
于 2013-01-05T21:25:11.037 回答