Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am looking for a way to do the following: If ("d1:d999") = "text in the cell" then copy ("e1:e999") to ("f1:f999") In other words I have a standard text like "tax" in d3, d18, d44, etc. If this text exsists then I want to copy e3, e18, e44, etc. to f3, f18, f44. If this possible? Thanks, Met -- Metrazal ------------------------------------------------------------------------ Metrazal's Profile: http://www.excelforum.com/member.php...o&userid=31648 View this thread: http://www.excelforum.com/showthread...hreadid=513359 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Sub CopyEtoF() mytext = "Whatever you want" For i = 1 To 999 If Cells(i, "D") = mytext Then Cells(i, "F") = Cells(i, "E") Next i End Sub "Metrazal" wrote: I am looking for a way to do the following: If ("d1:d999") = "text in the cell" then copy ("e1:e999") to ("f1:f999") In other words I have a standard text like "tax" in d3, d18, d44, etc. If this text exsists then I want to copy e3, e18, e44, etc. to f3, f18, f44. If this possible? Thanks, Met -- Metrazal ------------------------------------------------------------------------ Metrazal's Profile: http://www.excelforum.com/member.php...o&userid=31648 View this thread: http://www.excelforum.com/showthread...hreadid=513359 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub copydata()
Dim cell as Range for each cell in Range("d1:d999") if instr(1,cell.Value,"tax",vbTextCompare) then cell.offset(0,1).copy cell.offset(0,2) end if Next End Sub -- Regards, Tom Ogilvy "Metrazal" wrote in message ... I am looking for a way to do the following: If ("d1:d999") = "text in the cell" then copy ("e1:e999") to ("f1:f999") In other words I have a standard text like "tax" in d3, d18, d44, etc. If this text exsists then I want to copy e3, e18, e44, etc. to f3, f18, f44. If this possible? Thanks, Met -- Metrazal ------------------------------------------------------------------------ Metrazal's Profile: http://www.excelforum.com/member.php...o&userid=31648 View this thread: http://www.excelforum.com/showthread...hreadid=513359 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy contents from one cell to another | New Users to Excel | |||
Copy cell contents with VB | Excel Discussion (Misc queries) | |||
Copy contents to another page | Excel Worksheet Functions | |||
copy cell value not contents | Excel Discussion (Misc queries) | |||
Copy Contents of 3 Columns into 1 | Excel Programming |