PC Review


Reply
Thread Tools Rate Thread

Collating Collumn

 
 
Duncan
Guest
Posts: n/a
 
      28th Nov 2006
Hi All,

I need a way of collating a list so that I am left with a solid list,
my column has formulas in that are blank if the return value is false,
or display the return value if it is true. So it will look something
like the below

Peter Pan
(blank)
(blank)
(blank)
(blank)
Captain Hook
(blank)
(blank)
Snow White
(blank)
(blank)
(blank)

And I would really like to have something behind a button that would
put the names all together in another column with no blank spaces
between them
(like the below returned from the above example_

Peter Pan
Captain Hook
Snow White

Does this make sense? and is it possible? Can you use code to find out
if the formula in the cell has returned blank for false or value for
true?

Many thanks in advance

Duncan

 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFydGluIEZpc2hsb2Nr?=
Guest
Posts: n/a
 
      28th Nov 2006
This little routine will delete the rows where the cells or blank ie =""

Sub deleteblankrows()
Dim ptr As Long
Dim i As Long, lastrow As Long

With ActiveCell.CurrentRegion.Columns(1)
lastrow = .Rows.Count
For i = lastrow To 1 Step -1
If .Cells(i, 1).Value = "" Then
.Cells(i, 1).EntireRow.Delete
End If
Next i
End With
End Sub


Hope this helps
Martin Fishlock


"Duncan" wrote:

> Hi All,
>
> I need a way of collating a list so that I am left with a solid list,
> my column has formulas in that are blank if the return value is false,
> or display the return value if it is true. So it will look something
> like the below
>
> Peter Pan
> (blank)
> (blank)
> (blank)
> (blank)
> Captain Hook
> (blank)
> (blank)
> Snow White
> (blank)
> (blank)
> (blank)
>
> And I would really like to have something behind a button that would
> put the names all together in another column with no blank spaces
> between them
> (like the below returned from the above example_
>
> Peter Pan
> Captain Hook
> Snow White
>
> Does this make sense? and is it possible? Can you use code to find out
> if the formula in the cell has returned blank for false or value for
> true?
>
> Many thanks in advance
>
> Duncan
>
>

 
Reply With Quote
 
Duncan
Guest
Posts: n/a
 
      28th Nov 2006
Hi Martin,

No sorry i maybe didnt explain properly, My column is not really blank,
its just 'blank' if the formula is false, i.e the formula running down
it is

=IF(K4="AYE!!!",MID(A3,1,17),"")
=IF(K5="AYE!!!",MID(A4,1,17),"")
=IF(K6="AYE!!!",MID(A5,1,17),"")
=IF(K7="AYE!!!",MID(A6,1,17),"")
=IF(K8="AYE!!!",MID(A7,1,17),"")
=IF(K9="AYE!!!",MID(A8,1,17),"")
etc
etc

And also, I dont want to delete the blank ones as I will use this again
but with differant data, I just want to copy out the ones with a true
answer (the true result) and paste them all together in a list.

Many thanks

Duncan



Martin Fishlock wrote:
> This little routine will delete the rows where the cells or blank ie =""
>
> Sub deleteblankrows()
> Dim ptr As Long
> Dim i As Long, lastrow As Long
>
> With ActiveCell.CurrentRegion.Columns(1)
> lastrow = .Rows.Count
> For i = lastrow To 1 Step -1
> If .Cells(i, 1).Value = "" Then
> .Cells(i, 1).EntireRow.Delete
> End If
> Next i
> End With
> End Sub
>
>
> Hope this helps
> Martin Fishlock
>
>
> "Duncan" wrote:
>
> > Hi All,
> >
> > I need a way of collating a list so that I am left with a solid list,
> > my column has formulas in that are blank if the return value is false,
> > or display the return value if it is true. So it will look something
> > like the below
> >
> > Peter Pan
> > (blank)
> > (blank)
> > (blank)
> > (blank)
> > Captain Hook
> > (blank)
> > (blank)
> > Snow White
> > (blank)
> > (blank)
> > (blank)
> >
> > And I would really like to have something behind a button that would
> > put the names all together in another column with no blank spaces
> > between them
> > (like the below returned from the above example_
> >
> > Peter Pan
> > Captain Hook
> > Snow White
> >
> > Does this make sense? and is it possible? Can you use code to find out
> > if the formula in the cell has returned blank for false or value for
> > true?
> >
> > Many thanks in advance
> >
> > Duncan
> >
> >


 
Reply With Quote
 
Mike Fogleman
Guest
Posts: n/a
 
      28th Nov 2006
Sub CollateAtoB()
Dim LRow As Long, NxtRow As Long
Dim Rng As Range, c As Range

Lrow = Cells(Rows.Count, "A").End(xlUp).Row
NxtRow = 1
Set Rng = Range("A1:A"& LRow)
For Each c in Rng
If c.Value = "" Then
' do nothing
Else
Range("B"& NxtRow).Value = c.Value
NxtRow = NxtRow + 1
End If
Next
End Sub

This is untested, but should do what you want in column B.

Mike F
"Duncan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> I need a way of collating a list so that I am left with a solid list,
> my column has formulas in that are blank if the return value is false,
> or display the return value if it is true. So it will look something
> like the below
>
> Peter Pan
> (blank)
> (blank)
> (blank)
> (blank)
> Captain Hook
> (blank)
> (blank)
> Snow White
> (blank)
> (blank)
> (blank)
>
> And I would really like to have something behind a button that would
> put the names all together in another column with no blank spaces
> between them
> (like the below returned from the above example_
>
> Peter Pan
> Captain Hook
> Snow White
>
> Does this make sense? and is it possible? Can you use code to find out
> if the formula in the cell has returned blank for false or value for
> true?
>
> Many thanks in advance
>
> Duncan
>



 
Reply With Quote
 
Duncan
Guest
Posts: n/a
 
      28th Nov 2006
Mike,

Brilliant.

Thank you

Duncan


Mike Fogleman wrote:
> Sub CollateAtoB()
> Dim LRow As Long, NxtRow As Long
> Dim Rng As Range, c As Range
>
> Lrow = Cells(Rows.Count, "A").End(xlUp).Row
> NxtRow = 1
> Set Rng = Range("A1:A"& LRow)
> For Each c in Rng
> If c.Value = "" Then
> ' do nothing
> Else
> Range("B"& NxtRow).Value = c.Value
> NxtRow = NxtRow + 1
> End If
> Next
> End Sub
>
> This is untested, but should do what you want in column B.
>
> Mike F
> "Duncan" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi All,
> >
> > I need a way of collating a list so that I am left with a solid list,
> > my column has formulas in that are blank if the return value is false,
> > or display the return value if it is true. So it will look something
> > like the below
> >
> > Peter Pan
> > (blank)
> > (blank)
> > (blank)
> > (blank)
> > Captain Hook
> > (blank)
> > (blank)
> > Snow White
> > (blank)
> > (blank)
> > (blank)
> >
> > And I would really like to have something behind a button that would
> > put the names all together in another column with no blank spaces
> > between them
> > (like the below returned from the above example_
> >
> > Peter Pan
> > Captain Hook
> > Snow White
> >
> > Does this make sense? and is it possible? Can you use code to find out
> > if the formula in the cell has returned blank for false or value for
> > true?
> >
> > Many thanks in advance
> >
> > Duncan
> >


 
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
counting if data from one collumn is present in another collumn =?Utf-8?B?QW1lbGlh?= Microsoft Excel Worksheet Functions 1 8th Feb 2007 10:05 PM
looking for a value in a collumn exceluser2 Microsoft Excel Worksheet Functions 5 8th Feb 2006 11:53 PM
Looking up data within a collumn Demitre Microsoft Excel Misc 3 21st Dec 2005 01:08 AM
Last record in collumn. Tom Microsoft Excel Programming 3 6th Sep 2005 03:49 PM
Find a value in the collumn and then in that row =?Utf-8?B?T3hhbmFC?= Microsoft Excel Programming 2 2nd Dec 2004 06:01 PM


Features
 

Advertising
 

Newsgroups
 


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