how do I add the letter Y to column (U).
I need it to check if there is any data in the column to the left (column T), and if there is, Insert a Y in column U.
how do I add the letter Y to column (U).
I need it to check if there is any data in the column to the left (column T), and if there is, Insert a Y in column U.
Put this in U1 and drag-down:
![]()
Please Login or Register to view this content.
Oh! I get it.
I need rep--->҉
Thank you, but I need it in the VBA form.
I am getting closer. I now have this...
ws1.Range("A" & i & ":R" & i).Copy ws2.Rows(ws2.Cells(ws2.Rows.Count, 3).End(xlUp).Row + 1).Range("A1").Offset(RowOffset:=0, ColumnOffset:=1)
The ColumnOffset is now working.
The RowOffset is not. When I use RowOffset:=0, it still starts to paste on row 2 (I need it to start paste on row 3).
When I use RowOffset:=1, it starts to paste on line 3, but then skips every other row when pasting.
paste
skip row
paste
skip row
and so on.
Any ideas?
Here's a short straight-forward macro that does the task, I think.
Change the 1 in the FOR loop to whichever starting row you need.
![]()
Please Login or Register to view this content.
Thx Stew, this works. But if I wanted to change 1 part of it, to look in column "L" for anything less than (<) 240.00, and if it finds it, put "Y" in column "U", how would it look. It is only finding some of them. All values in row L is 0.1 to 0.63 right now, but this can change.
For row = 2 To lastRow
If Cells(row, "L") < "240.00" Then Cells(row, "U") = "Y"
Next row
Remove the quotation marks around 240.00 so that the decision compares numbers not strings.
Hope this helps,![]()
Please Login or Register to view this content.
- Stu
Stu, That worked.
Do you know the code for >72 and <240 in the same line?
This is the line I need to add >240 to....
![]()
Please Login or Register to view this content.
Last edited by Pat1009; 07-09-2015 at 06:34 PM.
Stu, That worked.
Do you know if there is VBA code to Change the cell color and font color to Red in Column "V" if column "M" is > 240.00?
_________________________________________________
Try something like this…
![]()
Please Login or Register to view this content.
Thx Stu! This is good
Hi Pat.
I just noticed that my sample code changed the cells in column V to red when the corresponding cell in column L was less than or equal to 240. You wanted greater than 240 and will need to adjust the decision and/or statements as you need. Will leave that exercise to you.
If this previous posts have been helpful, please click the 'Add Reputation' button.
- Stu
Yes,I saw that, thank you.
One last point - Color coding the cells can be accomplished with Conditional Formatting.
Using that would have the advantage of immediate results without having to run a macro.
- Some food for thought.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks