PC Review


Reply
Thread Tools Rate Thread

Another head banging problem

 
 
maprime12@gmail.com
Guest
Posts: n/a
 
      8th Jan 2007
Thanks to all who helped me solve my last problem now, I have another.
I have a spreadsheet that has alphanumeric information in column b, and
telephone number and the letters y or n (as in yes or no) in column d
on the same row. So for instance:

column b column c column d
column e
row1 298784 Y


row4 10025 (212)280-4018 (917)596-8194


row7 10019 (212)315-5607 (347)968-9446

row10 11355 (718)463-0674 (212)369-2490


row13 Y


row16 10024 (212)799-6026 (631)265-9168

row19 517472 N


row22 10024 (212)874-0220 (917)846-0910

row24 10023 (212)874-2356

row26 10025 (212)865-0329 (212)792-4155


row29 547852A1 Y

So, here's what I need to do. I need to grab all alphanumeric data off
of a row column b, where the value of the same row in column d is equal
to y or n and move it one column to the right in column a, all the
while keeping it on the same corresponding row. If the value of column
d is empty or it has one of those telephone numbers in it, it can
ignore it. I would really appreciate it if someone can figure it out.
Thanks in advance.

Marvin

 
Reply With Quote
 
 
 
 
maprime12@gmail.com
Guest
Posts: n/a
 
      8th Jan 2007
We almost have it. I tried the code that moves data to the left. I
see what it's doing, it's looking at the value of the first column in
question (in this case, column d), and evaluating whether or not there
is 1)a value in it and 2) whether or not the corresponding column b in
the same row has data. If these conditions are met, it moves the data
in column b over to column a.

What I wanted it to do was to look at column d, evaluate whether or not
there is a Y or N as the value of that cell and then go to the
corresponding column in the same row and then perform step 2). If
there is anything else other than Y or N, treat it the same as null,
which in this case would be to ignore it. Thanks for your help so far.

Marvin

On Jan 8, 11:37 am, Tom Ogilvy <TomOgi...@discussions.microsoft.com>
wrote:
> Sub AABB()
> Dim rng As Range
> Set rng = Columns(4).SpecialCells(xlConstants, xlTextValues)
> For Each cell In rng
> Cells(cell.Row, 1).Insert shift:=xlShiftToRight
> Next
>
> End Sub
>
> shifts all the data right (Kind of what you said - but I have doubts)
>
> if you want to move the value in column B left
>
> Sub AABB()
> Dim rng As Range
> Set rng = Columns(4).SpecialCells(xlConstants, xlTextValues)
> For Each cell In rng
> Cells(cell.Row, 2).copy cells(cell.row,1)
> cells(cell.row,2).ClearContents
> Next
>
> End Sub
> --
> Regards,
> Tom Ogilvy
>
>
>
> "maprim...@gmail.com" wrote:
> > Thanks to all who helped me solve my last problem now, I have another.
> > I have a spreadsheet that has alphanumeric information in column b, and
> > telephone number and the letters y or n (as in yes or no) in column d
> > on the same row. So for instance:

>
> > column b column c column d
> > column e
> > row1 298784 Y

>
> > row4 10025 (212)280-4018 (917)596-8194

>
> > row7 10019 (212)315-5607 (347)968-9446

>
> > row10 11355 (718)463-0674 (212)369-2490

>
> > row13 Y

>
> > row16 10024 (212)799-6026 (631)265-9168

>
> > row19 517472 N

>
> > row22 10024 (212)874-0220 (917)846-0910

>
> > row24 10023 (212)874-2356

>
> > row26 10025 (212)865-0329 (212)792-4155

>
> > row29 547852A1 Y

>
> > So, here's what I need to do. I need to grab all alphanumeric data off
> > of a row column b, where the value of the same row in column d is equal
> > to y or n and move it one column to the right in column a, all the
> > while keeping it on the same corresponding row. If the value of column
> > d is empty or it has one of those telephone numbers in it, it can
> > ignore it. I would really appreciate it if someone can figure it out.
> > Thanks in advance.

>
> > Marvin- Hide quoted text -- Show quoted text -


 
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
Banging my head on Guestbook.... NY Microsoft Frontpage 5 10th Aug 2006 03:45 AM
Banging head against wall Dakota Mon DIY PC 3 3rd Oct 2005 05:32 AM
Date in VB - Banging my Head on my desk!!!! =?Utf-8?B?TG93cmlkZXI3Mg==?= Microsoft Access VBA Modules 5 8th Apr 2005 10:19 PM
I'm really banging my head on this one Mike Boozer Microsoft Access Form Coding 3 18th Apr 2004 12:09 AM
head banging ricky Windows XP General 7 8th Dec 2003 08:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:19 AM.