Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default 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
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
Vlookup, if statement, maybe an and statement Jennifer Excel Discussion (Misc queries) 1 February 26th 10 03:30 AM
IF statement inside a SUMIF statement.... or alternative method Sungibungi Excel Worksheet Functions 3 December 4th 09 06:22 PM
Reconcile Bank statement & Credit card statement & accounting data Bklynhyc Excel Worksheet Functions 0 October 7th 09 09:07 PM
Embedding an OR statement in an IF statement efficiently Chatnoir11 Excel Discussion (Misc queries) 4 February 2nd 09 08:12 PM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM


All times are GMT +1. The time now is 09:07 PM.

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"