Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-11-2015, 08:00 AM
isasa74 isasa74 is offline concatenate the currency too Windows 7 64bit concatenate the currency too Office 2010 64bit
Novice
concatenate the currency too
 
Join Date: Dec 2015
Posts: 12
isasa74 is on a distinguished road
Default concatenate the currency too

Hi Guys,



this is my first post, so first of all thanks to everybody for the forum

I have a code that I use with great beneficial to compare two different sheets and spot out the differences.
At some point I used a formula to concatenate six cells, now two of them have a currency symbol along with the value (can be either USD or EUR) and I would need the symbol being concatenated as well.

VBA must dynamically be able to read the symbol in the cell and preserving it in the concatenation.
I'm not good with VBA so every suggested solution please have to be very well explained (sorry!)

Here the code:

Code:
Option Explicit
Sub Treat_Currency_Formules()

Application.ScreenUpdating = False

Dim ObjDic   As Object
Set ObjDic = CreateObject("Scripting.Dictionary")
Dim LR  As Long
Dim WSh1  As Worksheet, WSh2  As Worksheet
Dim I As Long
Dim CheckChar As String
Dim ValD, ValE
Dim WkStg As String
   Set WSh2 = Worksheets("Sheet2")
   Set WSh1 = Worksheets("Sheet1")
   CheckChar = "v"
   
   Application.ScreenUpdating = False
   With WSh2
      LR = .Cells(Rows.Count, 1).End(xlUp).Row
'---
      For I = 2 To LR
         ValD = CurAdj(.Cells(I, 4)): ValE = CurAdj(.Cells(I, 5))
         ObjDic.Item(Join(Array(.Cells(I, 1), .Cells(I, 2), .Cells(I, 3), ValD, ValE, .Cells(I, 6)), "/")) = Empty
         
      Next I
'---
       With Range(.Cells(2, 7), .Cells(LR, 7))
            .ClearContents
            WkStg = "=IF(ISBLANK(A2),"""",CONCATENATE(A2,""  "",B2,""  "",C2,""  "",""Price"",""  "",D2,""  "",""Freight"","" "",E2,""  "",""Duties"","" "",F2,))"
            .Cells(1, 1).Formula = WkStg
            .FillDown
        End With
   End With
Please any help is much much appreciated!!
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
concatenate the currency too Use Two (concatenate) Fields If Condition Is Met (If... Then... Else) SoonerLater Mail Merge 1 09-30-2015 05:40 PM
how to concatenate text box on new slide wichitawx PowerPoint 5 05-19-2015 05:17 AM
concatenate the currency too Concatenate with @ symbol anickles Excel 2 02-06-2015 09:39 AM
concatenate the currency too Concatenate if in descending order pgeorgilas Excel Programming 2 12-10-2014 01:35 AM
If, move and concatenate in VBA devcon Excel Programming 0 07-04-2011 12:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft