Forestq

Active Member
Joined
May 9, 2010
Messages
482
hi,

how to write CONCATENATE function to connect 3 fields (AM, AN, AO).

Code:
For i = 5 To x_ws1_rows

        ws1.Range("AK" & i).Value = ws1.Range("AG" & i).Value
        
        day1 = Day(ws1.Range("AK" & i).Value)
        ws1.Range("AM" & i).Value = day1
        
        month1 = Month(ws1.Range("AK" & i).Value)
        ws1.Range("AN" & i).Value = month1
        
        year1 = Year(ws1.Range("AK" & i).Value)
        ws1.Range("AO" & i).Value = year1
        
        'ws1.Range("AJ" & i).Value = "=CONCATENATE(ws1.Range("AM" & i).Value;ws1.Range("AN" & i).Value;ws1.Range("AO" & i).Value)"
        
Next i
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Maybe this:

Rich (BB code):
For i = 5 To x_ws1_rows

        ws1.Range("AK" & i).Value = ws1.Range("AG" & i).Value
         
        ws1.Range("AM" & i).Value = Day(ws1.Range("AK" & i).Value)
        
        ws1.Range("AN" & i).Value = Month(ws1.Range("AK" & i).Value) 
        
        ws1.Range("AO" & i).Value = Month(ws1.Range("AK" & i).Value)
        
        ws1.Range("AJ" & i).Value = ws1.Range("AM" & i).Value & ws1.Range("AN" & i).Value & ws1.Range("AO" & i).Value)"
        
Next i
 
Last edited:
Upvote 0
I was doing like this, but there was formating issue.

I did as below:

Code:
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[3],""/"",RC[4],""/"",RC[5])"
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,545
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top