Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to set a Y or N in cell Ax (based on the value in Counter)
depending on the value in cell Hx. I wrote this using the VB help, but it errors out on "Set curCell" Sub AddDeleteModify() For Counter = 2 To 200 Set curCell = Worksheets("Sheet1").Cells("H" & Counter) Set myCell = Worksheets("Sheet1").Cells("A" & Counter) If curCell Is Nothing Then Exit Sub If curCell = "New" Then myCell = "Y" If curCell < "New" Then myCell = "N" Next Counter End Sub Eventually, I want to add code that will start the counter over again, check Hx and put a Y or N in Bx is depeding on whether Hx is "Delete" Then restart the counter 1 last time and check Hx for "Modify" or "Re-Instate ID" and put a Y in Cx if either of those values are present, and an N if not. Any help would be appreciated. Also, is there a way to simply use the current worksheet, as I'm not sure that the name of the worksheet is always going to be Sheet1? Thank you very much for taking the time to read this. Best regards, Dee |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
putting one name under another on a cell | Excel Discussion (Misc queries) | |||
start a macro or procedure based on user putting an x in a cell | Excel Discussion (Misc queries) | |||
SAP BW Report - Putting the Unit of Measure or Currency in another Cell based on Format Cell | Excel Programming | |||
Putting Formula in Cell | Excel Programming | |||
Putting text in a cell | Excel Programming |