ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Inserting values (https://www.excelbanter.com/excel-programming/276282-re-inserting-values.html)

Chip Pearson

Inserting values
 
Rasmus,

Try the following:

Sub AAA()
Dim Rng As Range
Set Rng = Range("C1")
Do Until Rng.Value = ""
If StrComp(Rng.Value, "(WS)", vbTextCompare) = 0 Then
Rng(1, 4).Value = "WideScreen"
End If
Set Rng = Rng(2, 1)
Loop
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"Rasmus" wrote in message
le.rogers.com...
Hi everybody,

This is probably a breeze for most of you guys, but I can't get it to

work,
so please help:

I need a macro that runs through the whole of column C until it finds the
first empty row (ie the whole sheet). If any cell in column C CONTAINS the
values "(WS)" a value of "WIDESCREEN" should then be written in the same

row
but in column F.

Any quick ideas ? All help much appreciated.

Rasmus






All times are GMT +1. The time now is 11:40 PM.

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