Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculate one column move info from another

Status
Not open for further replies.

wafs

Technical User
Jan 17, 2006
112
US
is it possible to have an if statement look at one column and have another column move to a new worksheet???
 


Hi,
Code:
if cellobject.value = somevalue then
  someothercolumnobject.copy othersheet.othercellobject
end if


Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
Poultry in motion to pullet for a paltry amount! [tongue]
 
Thanks Skip it works, but now I need to add an add to that if. When I add the and to the if statement, it goes directly to end if and ends. HELP!!

Here is the code.
i = cellstart
TestRange = "AF" + i 'over 30 days column
TestRange2 = "AE" + i 'future 6 wks production column
TestRange3 = "A" + i 'part number column

If Sheets(sh).Range(TestRange) > 60 And Sheets(sh).Range(TestRange2) <> 0 Then


 


You apparently do not meet the criteria that you set.

What is the value of Sheets(sh).Range(TestRange)?

What is the value of Sheets(sh).Range(TestRange2)?


Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top