+ Reply to Thread
Results 1 to 2 of 2

How to obtain values from other columns in excel ??

Hybrid View

  1. #1
    Registered User
    Join Date
    10-25-2011
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    10

    How to obtain values from other columns in excel ??

    Hiii all,
    Plllease helpp. what is the method to concatenate values from two columns??
    I want to obtain the values from three different columns in excel and want to check if those values are concatenated and present exactly in the fourth coulmn .

    For eg.If column 1 has-PT50
    column2 has-456
    and column3 has -abc

    in column 4 must contain PT50456abc.Otherwise itmust be colored in red. can we use '&' for it.? Please find the code.Its showin error.

    Sub newone()
    
    Dim res As String
    
    For i = 4 To 8
    
    res = "PT50" & Cells(i, 3).Value&Cells(i, 5).Value&Cells(i, 15).Value
    If Cells(i, 16).Value <> res Then
    Cells(i, 16).Select
        With Selection.Font
            .Color = -16776961
            .TintAndShade = 0
        End With
    
    End If
    
    
    Next i
    End Sub
    Help
    Last edited by meen2525; 10-26-2011 at 08:17 AM.

  2. #2
    Registered User
    Join Date
    10-25-2011
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: How to obtain values from other columns in excel ??

    Solved it myself. needed space between &

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1