Right now this code doesn't quite work right. We are trying to make it so that when the DST_IMG_SRC column appears as part of this IF loop, it simply doesn't output that column at all. Right now, changing it by removing "And i <> 1" can cause it to blank the entire column by outputting "" which is an empty cell but we don't want it to export that column at all. What needs to happen is that sCell = [url removed, login to view](i, J) needs to not blindly write out every single column but when those 4 columns are encountered, don't export them to the CSV but export everything else.
We get conceptually what needs to happen but it is unclear exactly how to modify the code to make it do that. It's basically an IF statement with the correct syntax so that it doesn't set sCell = [url removed, login to view](i, J) which sets the first row of output as the entire series of outputs without stopping to remove those four.
Here is the relevant code.
Dim srcSheet As Worksheet
Dim dstSheet As Worksheet
Dim sCSVPath As String
Dim sCSVNoImgPath As String
Dim sEntry As String
Dim sCell As String
Dim sInc As String
Dim i As Integer
Dim J As Integer
Dim bSkipRow As Boolean
Open sCSVNoImgPath For Append As #2
For i = 1 To [url removed, login to view]
sEntry = ""
bSkipRow = False 'add a variable
For J = 1 To [url removed, login to view]
sCell = [url removed, login to view](i, J)
If (J = DST_V_WEIGHT And sCell = "") Then 'If J variable (Variant Weight Unit) is empty, make the skip that row variable true.
bSkipRow = True
If (bSkipRow = False) Then 'If the variable is false, continue checking and processing current row cells.
sCell = Replace(sCell, """", """""")
If J = DST_IMG_SRC Then
sCell = ""
If J = DST_V_IMAGE And i <> 1 Then
sCell = ""
If J = DST_IMG_POS And i <> 1 Then
sCell = ""
If J = DST_IMG_ALT And i <> 1 Then
sCell = ""
If sEntry = "" Then
sEntry = """" & sCell & """"
sEntry = sEntry & ",""" & sCell & """"
If (bSkipRow = False) Then
Print #2, sEntry
Bu iş için 10 freelancer ortalamada $26 teklif veriyor
Hello , I have read your project description and checked the coding. I understood what the issue is and can fix this in less than an hour. Relevant Skills and Experience Skills : Excel, Macros,VBA,VB.net Proposed Mil Daha Fazla
Hi, I can fix, Message me for discuss. Relevant Skills and Experience Excel, vba Proposed Milestones $20 USD - Project
Contact me to change the VBA code. Relevant Skills and Experience Very simple VBA code change Proposed Milestones $30 USD - Data Processing, Excel, Software Architecture, Visual Basic, Visual Basic for Apps
Hi , I am very good at vba and can start working on your simple task now ! Thank you Maath Relevant Skills and Experience VBA Proposed Milestones $15 USD - All Done I am updating my bid because your task is very s Daha Fazla
I am not a random bidder... Please ping me if you are intrested with my proposal and provide more details about the work. Thank you.. Relevant Skills and Experience VBA Proposed Milestones $50 USD - final
This is simple to do. Relevant Skills and Experience I'm an Informatics Engineer. C#, C++, Java Tutor at College and Unity3D (C#) Game Developer I have worked for many software development firms under interdisciplinar Daha Fazla
Its a one hour work which needs few lines of code. Relevant Skills and Experience VBA is something I am working from last 2 years and in Excel I am working from last 6 years. Proposed Milestones $25 USD - Editing the Daha Fazla