Fariz Setiawan
Selasa, 31 Maret 2026
VBA Cells().value is not working but range().value is working
example :
incorrectly : Cells("26, 2").Value = "b"
Correctly : Cells(26, 2).Value = "b"
try to delete the double quotes ("") if you using cells.value
however if you using range("").value should be there double quotes ("")
Rabu, 22 Oktober 2025
CREATE SEQUENCE ID IN EXCEL DATA COLUMNS
FOR EXAMPLE DATA EXCEL :
DATA :
A
B
C
A
A
B
D
C
C
C
So, we need to create the sequence number in the excel data using function,
if the data in Column "A" and the first row is 2 the function is :
=COUNTIFS($A$2:$A2, A2)
It will be creating the sequence id for all columns checking the all data.
it has worked well as proof picture on top.
FARIZ SETIAWAN
in Bahasa,
Ini merupakan cara untuk membuat sequence number didalam excel dengan menggunakan function,
id urut dalam excel dengan melakukan pengecekan terlebih dahulu pada seluruh data.
sehingga data yang dihasilkan valid.
Rabu, 15 Oktober 2025
VBA Text to Column solution with functionable
1. Create Function
2. Call the function
3. Function detail
---1. Create function----
Function TextToColumn(Reng As Range, Col As Integer, tipe As Variant)
Reng.TextToColumns Destination:=Reng, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=False, _
Semicolon:=False, _
Comma:=True, _
Space:=False, _
Other:=False, _
FieldInfo:=Array(Col, tipe), _
TrailingMinusNumbers:=True
End Function
---2. Call the function----
Worksheets("Sheet1").Select
Call TextToColumn(ActiveWorkbook.Sheets("Sheet1").Range("DD:DD"), 108, xlTextFormat)
'Reng = ActiveWorkbook.Sheets("Sheet1").Range("DD:DD") So, the range is columns DD
'Index Columns = 108 as counting column A = 1 so Column DD is 108
'Tipe = xlTextFormat
'example for other type such as xlGeneralFormat or following this reference table :
'xlDMYFormat 4 DMY date format.
'xlDYMFormat 7 DYM date format.
'xlEMDFormat 10 EMD date format.
'xlGeneralFormat 1 General.
'xlMDYFormat 3 MDY date format.
'xlMYDFormat 6 MYD date format.
'xlSkipColumn 9 Column is not parsed.
'xlTextFormat 2 Text.
'xlYDMFormat 8 YDM date format.
'xlYMDFormat 5 YMD date format.
'if you want the type is date you can choose xlDMYFormat to change xlTextFormat
'it is work well for my worksheet.
Kamis, 18 Juli 2024
Visual Studio error system.runtime.interopservices.sehexception: 'external component has thrown an exception.' / SEHException Class (System.Runtime.InteropServices)
Rabu, 21 Februari 2024
Fix an Error, An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll Additional information: Syntax error in UPDATE statement.
Senin, 05 September 2022
VBA Format date to text
Senin, 01 November 2021
VBA TEXT TO COLUMNS - FIXED WIDTH DATA TYPE
I want to make columns from text type to general type,
because when i tried to vlookup the data, the values were got #N/A.
Worksheet name = MP
Column target D1:D10000
its work code from text to general vba:
VBA TEXT TO GENERAL
ThisWorkbook.Sheets("MP").Activate
ThisWorkbook.Sheets("MP").Range("D1:D10000").Select
Selection.TextToColumns DataType:=xlGeneralFormat, _
ConsecutiveDelimiter:=False, Space:=False
You can modify Data type likes below,
xlColumnDataType
| XlColumnDataType can be one of these XlColumnDataType constants. |
| xlGeneralFormat. General |
| xlTextFormat. Text xlMDYFormat. MDY Date xlDMYFormat. DMY Date xlYMDFormat. YMD Date xlMYDFormat. MYD Date xlDYMFormat. DYM Date xlYDMFormat. YDM Date xlEMDFormat. EMD Date xlSkipColumn. Skip Column Hope can help you. |





