PC Review


Reply
Thread Tools Rate Thread

Changing values in a table

 
 
אלי
Guest
Posts: n/a
 
      24th Feb 2009
Hi all!

I am asking your help to solve a problem.
I have a general table consisted of 4 columns, and I want to change value in
a cell in one column if a combination of another 2 cells in the same row is
true.

My table looks like that:

A B C D
Capacity Capacity fix Cycle_Num Step_Num
1 10 1
1
2 20 1
1
3 30 1
1
4 40 1
2
5 50 1
2
6 60 1
2
7 70 1
2
1 10 2
1
2 20 2
1
3 30 2
1
4 40 2
2
5 50 2
2
6 60 2
2
7 70 2
2

and my question is: is it possible to change all the 'Capacity' values with
specific "Cycle_Num" and "Step_Num" indexes (for example Cycle_Num = 2 and
Step_Num = 1 ) if the first 'Capacity' value in this range is for example
higher then 2?

Thanks in advance

Eli

 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      24th Feb 2009


RowCount = 2
Do while Range("A" & RowCount) <> ""
Capacity = Range("A" & RowCount)
Cycle = Range("C" & RowCount)
Step = Range("D" & RowCount)
if Capacity > 2 and Cycle = 2 and Step = 1 then

'Enter you code here

End if

RowCount = RowCount + 1
loop

"אלי" wrote:

> Hi all!
>
> I am asking your help to solve a problem.
> I have a general table consisted of 4 columns, and I want to change value in
> a cell in one column if a combination of another 2 cells in the same row is
> true.
>
> My table looks like that:
>
> A B C D
> Capacity Capacity fix Cycle_Num Step_Num
> 1 10 1
> 1
> 2 20 1
> 1
> 3 30 1
> 1
> 4 40 1
> 2
> 5 50 1
> 2
> 6 60 1
> 2
> 7 70 1
> 2
> 1 10 2
> 1
> 2 20 2
> 1
> 3 30 2
> 1
> 4 40 2
> 2
> 5 50 2
> 2
> 6 60 2
> 2
> 7 70 2
> 2
>
> and my question is: is it possible to change all the 'Capacity' values with
> specific "Cycle_Num" and "Step_Num" indexes (for example Cycle_Num = 2 and
> Step_Num = 1 ) if the first 'Capacity' value in this range is for example
> higher then 2?
>
> Thanks in advance
>
> Eli
>

 
Reply With Quote
 
אלי
Guest
Posts: n/a
 
      24th Feb 2009
Many thanks

"Joel" wrote:

>
>
> RowCount = 2
> Do while Range("A" & RowCount) <> ""
> Capacity = Range("A" & RowCount)
> Cycle = Range("C" & RowCount)
> Step = Range("D" & RowCount)
> if Capacity > 2 and Cycle = 2 and Step = 1 then
>
> 'Enter you code here
>
> End if
>
> RowCount = RowCount + 1
> loop
>
> "אלי" wrote:
>
> > Hi all!
> >
> > I am asking your help to solve a problem.
> > I have a general table consisted of 4 columns, and I want to change value in
> > a cell in one column if a combination of another 2 cells in the same row is
> > true.
> >
> > My table looks like that:
> >
> > A B C D
> > Capacity Capacity fix Cycle_Num Step_Num
> > 1 10 1
> > 1
> > 2 20 1
> > 1
> > 3 30 1
> > 1
> > 4 40 1
> > 2
> > 5 50 1
> > 2
> > 6 60 1
> > 2
> > 7 70 1
> > 2
> > 1 10 2
> > 1
> > 2 20 2
> > 1
> > 3 30 2
> > 1
> > 4 40 2
> > 2
> > 5 50 2
> > 2
> > 6 60 2
> > 2
> > 7 70 2
> > 2
> >
> > and my question is: is it possible to change all the 'Capacity' values with
> > specific "Cycle_Num" and "Step_Num" indexes (for example Cycle_Num = 2 and
> > Step_Num = 1 ) if the first 'Capacity' value in this range is for example
> > higher then 2?
> >
> > Thanks in advance
> >
> > Eli
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is combo box is changing values in table? G. Microsoft Access Forms 2 28th Apr 2009 11:19 PM
Changing three text values in Table google3luo359@yahoo.com Microsoft Access Queries 3 14th May 2006 09:36 PM
changing values in a Word Table Simon Microsoft Excel New Users 0 29th Jun 2005 10:28 AM
changing table values Glenn Microsoft Access Getting Started 1 22nd Jul 2004 06:02 PM
Re: Changing Values in a table Allen Browne Microsoft Access VBA Modules 0 13th Feb 2004 01:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:55 AM.