Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy cell contents if "x" is present in cell.
I need help with some code.
I have a list of dealers in Column A. In Column B is HireDate. Column C - I has the heading of what game they deal (BJ,TCP,CRAPS,ect, ect.) In Column C-I has "x" if they deal that particular game. Column L-R has the same column heads (BJ,TCP,CRAPS, ect, ect.) What I want: If cell C3 has an "X" in the row (meaning if they deal that particular game or not) If there is an "x" in c3 then copy a3 to L3. Problem is that Dealers come and go (high turnover rate). If Cell A3 name changes, and he doesn't deal BJ then there will be an empty cell in the coresponding list of names (column L). I don't want to have any empty cells in columns L-R. I hope i have expained it properly. Thanks guys and gals. Robb |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy cell contents if "x" is present in cell.
Dim LastRow
LastRow = Sheet1.UsedRange.Row - 1 + _ Sheet1.UsedRange.Rows.Count For x = 1 to lastrow If sheet1.cells(x, 3).value = "X" then range("L" & x).value = range("A" & x).value End If Next x Jste this not tested it but it should do what you want -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert cell "contents" into a "comment" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
how to increase size of "name box" and "contents of cell " displa. | New Users to Excel | |||
how to copy contents of a cell and remove any quotes " " | Excel Discussion (Misc queries) | |||
if one cell has "X" textin contents, then pull cell "Y"... | Excel Worksheet Functions |