Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Statement
Does anyone have any suggestions for the following: Beginning with the third sheet in the workbook I would like: If any Cell in Column A = "Variance" (for all sheets in workbook Then: Copy the Cell in Colum "C" (in the same row as the text "Variance" i Column A) to : Column A beginning with Row 10 in the Sheet named Variance in th workbook. Any help would be greatly appreciated -- STEVE ----------------------------------------------------------------------- STEVEB's Profile: http://www.excelforum.com/member.php...nfo&userid=187 View this thread: http://www.excelforum.com/showthread.php?threadid=50638 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Statement
For r = 10 To 1000
If Cells(r, 1).Value = "Variance" Then Cells(r, 1).Value = Cells(r, 3).Value End If Next r -- Ian -- "STEVEB" wrote in message ... Does anyone have any suggestions for the following: Beginning with the third sheet in the workbook I would like: If any Cell in Column A = "Variance" (for all sheets in workbook) Then: Copy the Cell in Colum "C" (in the same row as the text "Variance" in Column A) to : Column A beginning with Row 10 in the Sheet named Variance in the workbook. Any help would be greatly appreciated! -- STEVEB ------------------------------------------------------------------------ STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872 View this thread: http://www.excelforum.com/showthread...hreadid=506383 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Statement
Thanks Ian, I appreciate your help! The code works except, instead of the value of Column C overwiting th Value in Column A, I would like the value in Column C copied to different sheet in the workbook. I would like the Value of column copied to a sheet named "variance" in the workbook beginning with Ro 10 column A. HTH . Thanks again -- STEVE ----------------------------------------------------------------------- STEVEB's Profile: http://www.excelforum.com/member.php...nfo&userid=187 View this thread: http://www.excelforum.com/showthread.php?threadid=50638 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Statement
For r = 10 To 1000
If Worksheets("Sheet1").Cells(r, 1).Value = "Variance" Then Worksheets("Variance").Cells(r, 1).Value = Worksheets("Sheet1").Cells(r, 3).Value End If Next r Change Sheet1 to suit your source sheet. It would probably have worked just adding the Worksheets("Variance") bit, but VBA can get a bit confused if the wrong sheet is active when you run the code. -- Ian -- "Ian" wrote in message ... For r = 10 To 1000 If Cells(r, 1).Value = "Variance" Then Cells(r, 1).Value = Cells(r, 3).Value End If Next r -- Ian -- "STEVEB" wrote in message ... Does anyone have any suggestions for the following: Beginning with the third sheet in the workbook I would like: If any Cell in Column A = "Variance" (for all sheets in workbook) Then: Copy the Cell in Colum "C" (in the same row as the text "Variance" in Column A) to : Column A beginning with Row 10 in the Sheet named Variance in the workbook. Any help would be greatly appreciated! -- STEVEB ------------------------------------------------------------------------ STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872 View this thread: http://www.excelforum.com/showthread...hreadid=506383 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Statement
Thanks Ian, Getting close...I appreciate your help! My workbook has between 20 & 40 sheets (This changes weekly) The first sheet is named "variance" and is used as a summary for al the other sheets in the workbook. Within all the other sheets, column A may contain the text "variance (some Sheets have none, other sheets have many). I would like the code to look through all the sheets in the workboo and if column A (in any sheet) has "variance" then copy the amount i column C (the same row as the text varaince- Colum A) to: The first sheet in the workbook named variance. The amounts should b copied beginning in row 10 column A. I hope this helps! Thanks again -- STEVE ----------------------------------------------------------------------- STEVEB's Profile: http://www.excelforum.com/member.php...nfo&userid=187 View this thread: http://www.excelforum.com/showthread.php?threadid=50638 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Statement
Sorry, I'm afraid I've not done much with multiple sheets in the way you
mention. Hopefully someone else can help you further. -- Ian -- "STEVEB" wrote in message ... Thanks Ian, Getting close...I appreciate your help! My workbook has between 20 & 40 sheets (This changes weekly) The first sheet is named "variance" and is used as a summary for all the other sheets in the workbook. Within all the other sheets, column A may contain the text "variance" (some Sheets have none, other sheets have many). I would like the code to look through all the sheets in the workbook and if column A (in any sheet) has "variance" then copy the amount in column C (the same row as the text varaince- Colum A) to: The first sheet in the workbook named variance. The amounts should be copied beginning in row 10 column A. I hope this helps! Thanks again! -- STEVEB ------------------------------------------------------------------------ STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872 View this thread: http://www.excelforum.com/showthread...hreadid=506383 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Vlookup, if statement, maybe an and statement | Excel Discussion (Misc queries) | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |