Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional data move syntax
I'm not sure what I doing wrong but my posts don't seem to be received. Anyway if this message is posted, I am having trouble with this VBA Macro. The If/Then Statement appears to be formatted incorrectly as the Macro always errors on the "Then .Cells(a, "K").......half of the statement.
I am trying to copy the data from one column "K" to the "J" column if the data in K is non zero. I do not know how many rows will be in the spreadsheet. The top row contains titles, hence stop at row 2. I will also need to Bold the copied data. Dim a As Long With Worksheets("OUTSTANDINGSALESORDERS") For a = .UsedRange.Rows.Count To 2 Step -1 If .Cells(a, "K").Value 0 Then .Cells(a, "K").copy .Offset(0, -1) Next End With Any help is appreciated Thanks Jon45 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Question about syntax for conditional formatting | Excel Worksheet Functions | |||
MACRO, syntax for move to different column | Excel Discussion (Misc queries) | |||
Syntax for Conditional Formats | Excel Worksheet Functions | |||
can I move data from workbook A to B using a conditional formula | Excel Worksheet Functions | |||
Syntax For Conditional Formula | Excel Worksheet Functions |