PC Review


Reply
 
 
gary
Guest
Posts: n/a
 
      7th Nov 2011
If B4 contains the same number as A3, how can I put the number in A4?

Here is my spreadsheet:

A B
1 0082766
2 0082767
3 0082768 0082768
4 0082768
5 0082768
6 0082768
7 0082768
8 0104361
9 0104365
10 0104367
11 0104368
12 0104370
13 0104409 0104409
14 0104409


=========


This is the result I'm looking for:


A B
1 0082766
2 0082767
3 0082768 0082768
4 0082768 0082768
5 0082768 0082768
6 0082768 0082768
7 0082768 0082768
8 0104361
9 0104365
10 0104367
11 0104368
12 0104370
13 0104409 0104409
14 0104409 0104409
 
Reply With Quote
 
 
 
 
GS
Guest
Posts: n/a
 
      7th Nov 2011
=IF(A3=B4,A3,"")

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      7th Nov 2011
On Nov 7, 1:08*pm, gary <gcott...@hotmail.com> wrote:
> If B4 contains the same number as A3, how can I put the number in A4?
>
> Here is my spreadsheet:
>
> * * * * * * *A * * * * * * * *B
> * 1 * * * * * * * * * * 0082766
> * 2 * * * * * * * * * * 0082767
> * 3 * *0082768 * 0082768
> * 4 * * * * * * * * * * 0082768
> * 5 * * * * * * * * * * 0082768
> * 6 * * * * * * * * * * 0082768
> * 7 * * * * * * * * * * 0082768
> * 8 * * * * * * * * * * 0104361
> * 9 * * * * * * * * * * 0104365
> 10 * * * * * * * * * * 0104367
> 11 * * * * * * * * * * 0104368
> 12 * * * * * * * * * * 0104370
> 13 * 0104409 * *0104409
> 14 * * * * * * * * * * 0104409
>
> =========
>
> This is the result I'm looking for:
>
> * * * * * *A * * * * * * * *B
> * 1 * * * * * * * * * * 0082766
> * 2 * * * * * * * * * * 0082767
> * 3 * *0082768 * 0082768
> * 4 * *0082768 * 0082768
> * 5 * *0082768 * 0082768
> * 6 * *0082768 * 0082768
> * 7 * *0082768 * 0082768
> * 8 * * * * * * * * * * 0104361
> * 9 * * * * * * * * * * 0104365
> 10 * * * * * * * * * * 0104367
> 11 * * * * * * * * * * 0104368
> 12 * * * * * * * * * * 0104370
> 13 * 0104409 * *0104409
> 14 * 0104409 * *0104409


You posted in misc and I gave you a macro that was TESTED and DOES
work.
You said "it didn't work"
What does " it didn't work" mean. I tested. All you had to do was
change
mc = 2 to whatever column you are testing.

Sub copynumbersif()
Dim mc As Long
Dim i As Long
mc = 2
For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
If Cells(i - 1, mc) = Cells(i, mc) Then
Cells(i - 1, mc - 1) = Cells(i, mc)
Cells(i, mc - 1) = Cells(i, mc)
End If
Next i
End Sub


 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      7th Nov 2011
Go 'horns


Gord

On Mon, 7 Nov 2011 13:01:20 -0800 (PST), Don Guillett
<(E-Mail Removed)> wrote:

>On Nov 7, 1:08*pm, gary <gcott...@hotmail.com> wrote:
>> If B4 contains the same number as A3, how can I put the number in A4?
>>
>> Here is my spreadsheet:
>>
>> * * * * * * *A * * * * * * * *B
>> * 1 * * * * * * * * * * 0082766
>> * 2 * * * * * * * * * * 0082767
>> * 3 * *0082768 * 0082768
>> * 4 * * * * * * * * * * 0082768
>> * 5 * * * * * * * * * * 0082768
>> * 6 * * * * * * * * * * 0082768
>> * 7 * * * * * * * * * * 0082768
>> * 8 * * * * * * * * * * 0104361
>> * 9 * * * * * * * * * * 0104365
>> 10 * * * * * * * * * * 0104367
>> 11 * * * * * * * * * * 0104368
>> 12 * * * * * * * * * * 0104370
>> 13 * 0104409 * *0104409
>> 14 * * * * * * * * * * 0104409
>>
>> =========
>>
>> This is the result I'm looking for:
>>
>> * * * * * *A * * * * * * * *B
>> * 1 * * * * * * * * * * 0082766
>> * 2 * * * * * * * * * * 0082767
>> * 3 * *0082768 * 0082768
>> * 4 * *0082768 * 0082768
>> * 5 * *0082768 * 0082768
>> * 6 * *0082768 * 0082768
>> * 7 * *0082768 * 0082768
>> * 8 * * * * * * * * * * 0104361
>> * 9 * * * * * * * * * * 0104365
>> 10 * * * * * * * * * * 0104367
>> 11 * * * * * * * * * * 0104368
>> 12 * * * * * * * * * * 0104370
>> 13 * 0104409 * *0104409
>> 14 * 0104409 * *0104409

>
>You posted in misc and I gave you a macro that was TESTED and DOES
>work.
> You said "it didn't work"
>What does " it didn't work" mean. I tested. All you had to do was
>change
>mc = 2 to whatever column you are testing.
>
>Sub copynumbersif()
>Dim mc As Long
>Dim i As Long
>mc = 2
>For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
>If Cells(i - 1, mc) = Cells(i, mc) Then
>Cells(i - 1, mc - 1) = Cells(i, mc)
>Cells(i, mc - 1) = Cells(i, mc)
>End If
>Next i
>End Sub
>

 
Reply With Quote
 
gary
Guest
Posts: n/a
 
      7th Nov 2011
On Nov 7, 1:09*pm, Gord Dibben <phnor...@shaw.ca> wrote:
> Go 'horns
>
> Gord
>
> On Mon, 7 Nov 2011 13:01:20 -0800 (PST), Don Guillett
>
>
>
> <dguille...@gmail.com> wrote:
> >On Nov 7, 1:08*pm, gary <gcott...@hotmail.com> wrote:
> >> If B4 contains the same number as A3, how can I put the number in A4?

>
> >> Here is my spreadsheet:

>
> >> * * * * * * *A * * * * * * * *B
> >> * 1 * * * * * * * * * * 0082766
> >> * 2 * * * * * * * * * * 0082767
> >> * 3 * *0082768 * 0082768
> >> * 4 * * * * * * * * * * 0082768
> >> * 5 * * * * * * * * * * 0082768
> >> * 6 * * * * * * * * * * 0082768
> >> * 7 * * * * * * * * * * 0082768
> >> * 8 * * * * * * * * * * 0104361
> >> * 9 * * * * * * * * * * 0104365
> >> 10 * * * * * * * * * * 0104367
> >> 11 * * * * * * * * * * 0104368
> >> 12 * * * * * * * * * * 0104370
> >> 13 * 0104409 * *0104409
> >> 14 * * * * * * * * * * 0104409

>
> >> =========

>
> >> This is the result I'm looking for:

>
> >> * * * * * *A * * * * * * * *B
> >> * 1 * * * * * * * * * * 0082766
> >> * 2 * * * * * * * * * * 0082767
> >> * 3 * *0082768 * 0082768
> >> * 4 * *0082768 * 0082768
> >> * 5 * *0082768 * 0082768
> >> * 6 * *0082768 * 0082768
> >> * 7 * *0082768 * 0082768
> >> * 8 * * * * * * * * * * 0104361
> >> * 9 * * * * * * * * * * 0104365
> >> 10 * * * * * * * * * * 0104367
> >> 11 * * * * * * * * * * 0104368
> >> 12 * * * * * * * * * * 0104370
> >> 13 * 0104409 * *0104409
> >> 14 * 0104409 * *0104409

>
> >You posted in misc and I gave you a macro that was TESTED and DOES
> >work.
> > You said "it didn't work"
> >What does " it didn't work" mean. I tested. All you had to do was
> >change
> >mc = 2 *to whatever column you are testing.

>
> >Sub copynumbersif()
> >Dim mc As Long
> >Dim i As Long
> >mc = 2
> >For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
> >If Cells(i - 1, mc) = Cells(i, mc) Then
> >Cells(i - 1, mc - 1) = Cells(i, mc)
> >Cells(i, mc - 1) = Cells(i, mc)
> >End If
> >Next i
> >End Sub- Hide quoted text -

>
> - Show quoted text -


Here's more of my spreadsheet:


A B
0082655
0082657
0082657
0082657
0082669
0082669
0082669
0082698
0082698
0082698
0082715
0082715
0082715
0082716
0082716
0082716
0082717
0082717
0082717
0082728
0082728
0082728
0082763
0082765
0082765
0082765
0082766
0082767
0082768 0082768
0082768
0082768
0082768
0082768
0082769 0082769
0082769
0082769
0082769
0082769
0082770 0082770
0082770
0082770
0082770
0082770
0082771 0082771
0082771
0082771
0082771
0082771
0082789
0082789
0082789
0082793
0082794
0082795
0082796
0082797
0082797
0082797
0082800
0082800
0082800
0082811
0082811
0082811
0083855
0083859
0083859
0083859
0083864
0083864
0083865
0083865
0083865
0083867
0083867
0083868
0083868
0083868
0083870
0083873
0083873
0083874
0083874
0083874
0083875
0083875
0083875
0083876
0083876
0083876
0083877
0083877
0083877
0083878
0083878
0083878
0083879
0083879
0083879
0083880
0083880
0083880
0083881
0083881
0083881
0083882
0083882
0083882
0083883
0083884
0083884

In col A, only these numbers should appear (each 4 times):

0082768
0082769
0082770
0082771
 
Reply With Quote
 
gary
Guest
Posts: n/a
 
      7th Nov 2011
On Nov 7, 1:09*pm, Gord Dibben <phnor...@shaw.ca> wrote:
> Go 'horns
>
> Gord
>
> On Mon, 7 Nov 2011 13:01:20 -0800 (PST), Don Guillett
>
>
>
> <dguille...@gmail.com> wrote:
> >On Nov 7, 1:08*pm, gary <gcott...@hotmail.com> wrote:
> >> If B4 contains the same number as A3, how can I put the number in A4?

>
> >> Here is my spreadsheet:

>
> >> * * * * * * *A * * * * * * * *B
> >> * 1 * * * * * * * * * * 0082766
> >> * 2 * * * * * * * * * * 0082767
> >> * 3 * *0082768 * 0082768
> >> * 4 * * * * * * * * * * 0082768
> >> * 5 * * * * * * * * * * 0082768
> >> * 6 * * * * * * * * * * 0082768
> >> * 7 * * * * * * * * * * 0082768
> >> * 8 * * * * * * * * * * 0104361
> >> * 9 * * * * * * * * * * 0104365
> >> 10 * * * * * * * * * * 0104367
> >> 11 * * * * * * * * * * 0104368
> >> 12 * * * * * * * * * * 0104370
> >> 13 * 0104409 * *0104409
> >> 14 * * * * * * * * * * 0104409

>
> >> =========

>
> >> This is the result I'm looking for:

>
> >> * * * * * *A * * * * * * * *B
> >> * 1 * * * * * * * * * * 0082766
> >> * 2 * * * * * * * * * * 0082767
> >> * 3 * *0082768 * 0082768
> >> * 4 * *0082768 * 0082768
> >> * 5 * *0082768 * 0082768
> >> * 6 * *0082768 * 0082768
> >> * 7 * *0082768 * 0082768
> >> * 8 * * * * * * * * * * 0104361
> >> * 9 * * * * * * * * * * 0104365
> >> 10 * * * * * * * * * * 0104367
> >> 11 * * * * * * * * * * 0104368
> >> 12 * * * * * * * * * * 0104370
> >> 13 * 0104409 * *0104409
> >> 14 * 0104409 * *0104409

>
> >You posted in misc and I gave you a macro that was TESTED and DOES
> >work.
> > You said "it didn't work"
> >What does " it didn't work" mean. I tested. All you had to do was
> >change
> >mc = 2 *to whatever column you are testing.

>
> >Sub copynumbersif()
> >Dim mc As Long
> >Dim i As Long
> >mc = 2
> >For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
> >If Cells(i - 1, mc) = Cells(i, mc) Then
> >Cells(i - 1, mc - 1) = Cells(i, mc)
> >Cells(i, mc - 1) = Cells(i, mc)
> >End If
> >Next i
> >End Sub- Hide quoted text -

>
> - Show quoted text -


========================================

Here's more of my spreadsheet:

A B
0082655
0082657
0082657
0082657
0082669
0082669
0082669
0082698
0082698
0082698
0082715
0082715
0082715
0082716
0082716
0082716
0082717
0082717
0082717
0082728
0082728
0082728
0082763
0082765
0082765
0082765
0082766
0082767
0082768 0082768
0082768
0082768
0082768
0082768
0082769 0082769
0082769
0082769
0082769
0082769
0082770 0082770
0082770
0082770
0082770
0082770
0082771 0082771
0082771
0082771
0082771
0082771
0082789
0082789
0082789
0082793
0082794
0082795
0082796
0082797
0082797
0082797
0082800
0082800
0082800
0082811
0082811
0082811
0083855
0083859
0083859
0083859
0083864
0083864
0083865
0083865
0083865
0083867
0083867
0083868
0083868
0083868
0083870
0083873
0083873
0083874
0083874
0083874
0083875
0083875
0083875
0083876
0083876
0083876
0083877
0083877
0083877
0083878
0083878
0083878
0083879
0083879
0083879
0083880
0083880
0083880
0083881
0083881
0083881
0083882
0083882
0083882
0083883
0083884
0083884


In col A, only these numbers should appear (each 5 times):


0082768
0082769
0082770
0082771




 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      7th Nov 2011
On Nov 7, 3:09*pm, Gord Dibben <phnor...@shaw.ca> wrote:
> Go 'horns
>
> Gord
>
> On Mon, 7 Nov 2011 13:01:20 -0800 (PST), Don Guillett
>
>
>
>
>
>
>
> <dguille...@gmail.com> wrote:
> >On Nov 7, 1:08*pm, gary <gcott...@hotmail.com> wrote:
> >> If B4 contains the same number as A3, how can I put the number in A4?

>
> >> Here is my spreadsheet:

>
> >> * * * * * * *A * * * * * * * *B
> >> * 1 * * * * * * * * * * 0082766
> >> * 2 * * * * * * * * * * 0082767
> >> * 3 * *0082768 * 0082768
> >> * 4 * * * * * * * * * * 0082768
> >> * 5 * * * * * * * * * * 0082768
> >> * 6 * * * * * * * * * * 0082768
> >> * 7 * * * * * * * * * * 0082768
> >> * 8 * * * * * * * * * * 0104361
> >> * 9 * * * * * * * * * * 0104365
> >> 10 * * * * * * * * * * 0104367
> >> 11 * * * * * * * * * * 0104368
> >> 12 * * * * * * * * * * 0104370
> >> 13 * 0104409 * *0104409
> >> 14 * * * * * * * * * * 0104409

>
> >> =========

>
> >> This is the result I'm looking for:

>
> >> * * * * * *A * * * * * * * *B
> >> * 1 * * * * * * * * * * 0082766
> >> * 2 * * * * * * * * * * 0082767
> >> * 3 * *0082768 * 0082768
> >> * 4 * *0082768 * 0082768
> >> * 5 * *0082768 * 0082768
> >> * 6 * *0082768 * 0082768
> >> * 7 * *0082768 * 0082768
> >> * 8 * * * * * * * * * * 0104361
> >> * 9 * * * * * * * * * * 0104365
> >> 10 * * * * * * * * * * 0104367
> >> 11 * * * * * * * * * * 0104368
> >> 12 * * * * * * * * * * 0104370
> >> 13 * 0104409 * *0104409
> >> 14 * 0104409 * *0104409

>
> >You posted in misc and I gave you a macro that was TESTED and DOES
> >work.
> > You said "it didn't work"
> >What does " it didn't work" mean. I tested. All you had to do was
> >change
> >mc = 2 *to whatever column you are testing.

>
> >Sub copynumbersif()
> >Dim mc As Long
> >Dim i As Long
> >mc = 2
> >For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
> >If Cells(i - 1, mc) = Cells(i, mc) Then
> >Cells(i - 1, mc - 1) = Cells(i, mc)
> >Cells(i, mc - 1) = Cells(i, mc)
> >End If
> >Next i
> >End Sub


Gord, Thanks. Looks like the University of Texas football team is on
the right track back and will be playing "power football" . BTW,it's
"Hook em horns" Come see me in Austin.
 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      8th Nov 2011
"Hook 'em horns"

I'll remember that Don.

Not much chance of me getting to Austin.

With my list of health issues over the past 6 years my travel
insurance cost could equal your national debt.



On Mon, 7 Nov 2011 15:35:26 -0800 (PST), Don Guillett
<(E-Mail Removed)> wrote:

>Gord, Thanks. Looks like the University of Texas football team is on
>the right track back and will be playing "power football" . BTW,it's
>"Hook em horns" Come see me in Austin.

 
Reply With Quote
 
rumkus@hotmail.com
Guest
Posts: n/a
 
      8th Nov 2011
> With my list of health issues over the past 6 years my travel
> insurance cost could equal your national debt.


Damn ! I'd put all my money to us bonds !
 
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



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:01 PM.