LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
CJ CJ is offline
external usenet poster
 
Posts: 18
Default Set Cell.Value = text & dynamic value

SheetName = A001
A B C D E F G
1 A001.1 Status:
2
3
4
5
6 A001.2 Status:
7
8
9 A001.3 Status:

I am trying to write macro for setting the value in the B column for
rows only in which G = "Status:"
The value is the SheetName & ".1"
(Then & ".2", Then & ".3" in sequence)

Can anyone help me?
Here is what sets the first value correctly, now I need it to be
dynamic. Thanks!!!!

Sub CellValues()

Dim rStatus As Range
Dim rng As Range

With ThisWorkbook.ActiveSheet
Set rStatus = .Range(.Range("G14"), .Range("G14").End(xlDown))
End With

For Each rng in rStatus
If rng = "Status:" Then
rng.Offset(0, -5).Value = ActiveSheet.Name & ".1"
prevTC = ActiveCell.Value
End If
Next rng

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic character counter for merged cell text field JASelep Excel Worksheet Functions 1 August 29th 07 07:24 PM
Custom Footer (Dynamic text with Static text) Maximus[_3_] Excel Programming 1 April 9th 07 11:22 PM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Excel Programming 0 March 1st 06 01:05 AM
dynamic cell reference within a text string gvm Excel Worksheet Functions 4 July 25th 05 02:40 AM


All times are GMT +1. The time now is 01:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"