Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 02-07-2012, 02:37 PM
macropod's Avatar
macropod macropod is offline changing Windows 7 64bit changing Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,527
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi gsrikanth,

Try:
Code:
Sub CombineValues()
Dim i As Long
With ActiveSheet
  For i = 1 To .Cells.SpecialCells(xlCellTypeLastCell).Row
    If IsNumeric(Evaluate(.Range("A" & i).Value)) And IsNumeric(Evaluate(.Range("B" & i).Value)) Then
      .Range("B" & i).Value = Evaluate(.Range("A" & i).Value) + Evaluate(.Range("B" & i).Value)
    Else
      .Range("B" & i).Value = .Range("A" & i).Value & " " & .Range("B" & i).Value
    End If
      .Range("B" & i).NumberFormat = "General"
  Next
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
changing Changing accounts on same PC cjansley Outlook 1 07-27-2011 07:36 AM
changing Changing the From field jerem Outlook 2 10-29-2010 03:04 PM
Changing list of Value xmadnet Word 0 09-07-2010 01:48 PM
Changing Word doc to .txt cialili Word 1 08-02-2010 12:38 PM
changing font size without changing leading carolns Word 1 09-14-2009 12:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:35 AM.


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