Moubasher82
New Member
- Joined
- Aug 22, 2015
- Messages
- 4
Good day friends,
I have a sheet which has two columns, one is the Column "A" which is the Nationality, and column "B" which is the Language.
I need to populate the language column "B" based of the nationality on column "A" as below:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Nationality[/TD]
[TD]Language[/TD]
[/TR]
[TR]
[TD]ESP[/TD]
[TD]ES[/TD]
[/TR]
[TR]
[TD]USA[/TD]
[TD]EN[/TD]
[/TR]
[TR]
[TD]BRA[/TD]
[TD]PT[/TD]
[/TR]
[TR]
[TD]EGY[/TD]
[TD]AR[/TD]
[/TR]
</tbody>[/TABLE]
I have a script which was working fine until recently giving me memory error, the script is:
The error is :
It was working fine before but suddenly I don't know it is giving this error message.
Please help me with another script or a how tofix to this error message.
Thank you very much
I have a sheet which has two columns, one is the Column "A" which is the Nationality, and column "B" which is the Language.
I need to populate the language column "B" based of the nationality on column "A" as below:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Nationality[/TD]
[TD]Language[/TD]
[/TR]
[TR]
[TD]ESP[/TD]
[TD]ES[/TD]
[/TR]
[TR]
[TD]USA[/TD]
[TD]EN[/TD]
[/TR]
[TR]
[TD]BRA[/TD]
[TD]PT[/TD]
[/TR]
[TR]
[TD]EGY[/TD]
[TD]AR[/TD]
[/TR]
</tbody>[/TABLE]
I have a script which was working fine until recently giving me memory error, the script is:
Code:
Sub LanguageGenerator()
'Language Column Generator
Dim Bits
Dim i As Long
Const Lbls As String = "ES,ES,GB,EN,RU,RU,BR,PT,IT,IT,AR,ES,FR,FR,UA,RU,NL,EN,PT,PT,MX,ES,US,EN,PL,PL,IE,EN,TR,EN,AU,EN,CO,ES,DE,EN,DK,EN,JP,JP,LK,EN,RO,EN,VE,ES" '<- Add more as required
Application.ScreenUpdating = False
Bits = Split(Lbls, ",")
With range("A1:A" & range("l" & Rows.Count).End(xlUp).Row)
For i = 0 To UBound(Bits) Step 2
.AutoFilter Field:=1, Criteria1:="*" & Bits(i) & "*"
.Offset(, 1).SpecialCells(xlVisible).Value = Bits(i + 1)
Next i
.AutoFilter
.Offset(, 1).Cells(1).Value = "Language"
End With
End Sub
The error is :
Code:
There isn't enough memory to complete this action.
Try using less data or closing other application.
......end of error massege
It was working fine before but suddenly I don't know it is giving this error message.
Please help me with another script or a how tofix to this error message.
Thank you very much
Last edited: