ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need your help. I need to add additional information into cells (https://www.excelbanter.com/excel-programming/360596-need-your-help-i-need-add-additional-information-into-cells.html)

Shani

Need your help. I need to add additional information into cells
 
I need to add the Equity to each cell in A in addition to what is
already there. so if A1 = hello I want A1=hello Equity.


Bob Phillips[_14_]

Need your help. I need to add additional information into cells
 
Sub Test()
Dim iLastRow As Long
Dim i As Long

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To iLastRow
If cell.Value < "" Then
If Not cell.HasFormula Then
cell.Value = cell.Value & " Equity"
End If
End If
Next i

End Sub



--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Shani" wrote in message
oups.com...
I need to add the Equity to each cell in A in addition to what is
already there. so if A1 = hello I want A1=hello Equity.




Tom Ogilvy

Need your help. I need to add additional information into cells
 
Sub ABC()
Dim rng as Range, cell as Range
set rng = Range(Cells(1,1),cells(rows.count,1).End(xlup))
for each cell in rng
if len(trim(cell.Value)) 0 then
cell.Value = trim(cell.Value) & " Equity"
end if
Next
End sub

Adjust to fit your requirements.

--
Regards,
Tom Ogilvy


"Shani" wrote:

I need to add the Equity to each cell in A in addition to what is
already there. so if A1 = hello I want A1=hello Equity.



Shani

Need your help. I need to add additional information into cells
 
thank you very much


Shani

Need your help. I need to add additional information into cells
 
If cell.Value < "" Then

returns error


Bob Phillips[_14_]

Need your help. I need to add additional information into cells
 
sorry, should have been

Sub Test()
Dim iLastRow As Long
Dim i As Long

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To iLastRow
If Cells(i, "A").Value < "" Then
If Not Cells(i, "A").HasFormula Then
Cells(i, "A").Value = Cells(i, "A").Value & " Equity"
End If
End If
Next i

End Sub


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Shani" wrote in message
oups.com...
If cell.Value < "" Then

returns error





All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com