Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default 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
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
Convert cell "contents" into a "comment" Ryan Excel Discussion (Misc queries) 4 October 3rd 08 11:34 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
how to increase size of "name box" and "contents of cell " displa. Stubby- LIBERTY New Users to Excel 2 February 22nd 07 06:43 PM
how to copy contents of a cell and remove any quotes " " jonny Excel Discussion (Misc queries) 2 January 28th 07 06:48 PM
if one cell has "X" textin contents, then pull cell "Y"... azazel Excel Worksheet Functions 3 October 24th 05 05:43 PM


All times are GMT +1. The time now is 05:42 AM.

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

About Us

"It's about Microsoft Excel"