Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Identify Blank Cells in Col & move coresponding data

I need to identify which rows have a blank cell in colum E. I then need to
move the data from:

F to E
G to F
H to G

I would like to do this without moving the data from the remaing rows.

Manually I would filter by blank for that column, then delete the affected
cells from column E. I would allow Excel to move the data to the left. I
would then go to column H and insert blank cells, moving the remaining rows
I~?? to the right


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Identify Blank Cells in Col & move coresponding data

Assuming nothing in the Cols past Column H, select the entire range in Col E
that you want to fix, do Edit / Go To / Special / Blanks. Now do Edit / Delete
/ Shift cells left.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Yogi_Bear_79" wrote in message
...
I need to identify which rows have a blank cell in colum E. I then need to
move the data from:

F to E
G to F
H to G

I would like to do this without moving the data from the remaing rows.

Manually I would filter by blank for that column, then delete the affected
cells from column E. I would allow Excel to move the data to the left. I
would then go to column H and insert blank cells, moving the remaining rows
I~?? to the right




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Identify Blank Cells in Col & move coresponding data

Ken,

That's a pretty cool way of doing that. But I do have data past col H, that
needs to be shifted back. Also this would be preferable via VB. I realize I
can record the macro, but since these cells can differ, I didn't want to
limit myself to certain rows.



"Ken Wright" wrote in message
...
Assuming nothing in the Cols past Column H, select the entire range in Col

E
that you want to fix, do Edit / Go To / Special / Blanks. Now do Edit /

Delete
/ Shift cells left.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

--------------------------------------------------------------------------

--
It's easier to beg forgiveness than ask permission :-)
--------------------------------------------------------------------------

--



"Yogi_Bear_79" wrote in message
...
I need to identify which rows have a blank cell in colum E. I then need

to
move the data from:

F to E
G to F
H to G

I would like to do this without moving the data from the remaing rows.

Manually I would filter by blank for that column, then delete the

affected
cells from column E. I would allow Excel to move the data to the left. I
would then go to column H and insert blank cells, moving the remaining

rows
I~?? to the right




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Identify Blank Cells in Col & move coresponding data

Sub AATester1()
Dim rng As Range, rng1 As Range
On Error Resume Next
Set rng = Columns(5).SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
Set rng1 = Intersect(Columns(1), rng.EntireRow)
rng.Delete Shift:=xlToLeft
Set rng1 = Intersect(Columns(8), rng1.EntireRow)
rng1.Insert Shift:=xlToRight
End If
End Sub

--
Regards,
Tom Ogilvy

"Yogi_Bear_79" wrote in message
...
Ken,

That's a pretty cool way of doing that. But I do have data past col H,

that
needs to be shifted back. Also this would be preferable via VB. I realize

I
can record the macro, but since these cells can differ, I didn't want to
limit myself to certain rows.



"Ken Wright" wrote in message
...
Assuming nothing in the Cols past Column H, select the entire range in

Col
E
that you want to fix, do Edit / Go To / Special / Blanks. Now do Edit /

Delete
/ Shift cells left.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03


--------------------------------------------------------------------------
--
It's easier to beg forgiveness than ask permission :-)


--------------------------------------------------------------------------
--



"Yogi_Bear_79" wrote in message
...
I need to identify which rows have a blank cell in colum E. I then

need
to
move the data from:

F to E
G to F
H to G

I would like to do this without moving the data from the remaing rows.

Manually I would filter by blank for that column, then delete the

affected
cells from column E. I would allow Excel to move the data to the left.

I
would then go to column H and insert blank cells, moving the remaining

rows
I~?? to the right




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Identify Blank Cells in Col & move coresponding data

Cool,

Tom,

Does this work because once the special cells (blanks are selected it
only works with those rows versus the entire column?


"Tom Ogilvy" wrote in message
...
Sub AATester1()
Dim rng As Range, rng1 As Range
On Error Resume Next
Set rng = Columns(5).SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
Set rng1 = Intersect(Columns(1), rng.EntireRow)
rng.Delete Shift:=xlToLeft
Set rng1 = Intersect(Columns(8), rng1.EntireRow)
rng1.Insert Shift:=xlToRight
End If
End Sub

--
Regards,
Tom Ogilvy

"Yogi_Bear_79" wrote in message
...
Ken,

That's a pretty cool way of doing that. But I do have data past col H,

that
needs to be shifted back. Also this would be preferable via VB. I

realize
I
can record the macro, but since these cells can differ, I didn't want to
limit myself to certain rows.



"Ken Wright" wrote in message
...
Assuming nothing in the Cols past Column H, select the entire range in

Col
E
that you want to fix, do Edit / Go To / Special / Blanks. Now do Edit

/
Delete
/ Shift cells left.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03



--------------------------------------------------------------------------
--
It's easier to beg forgiveness than ask permission :-)



--------------------------------------------------------------------------
--



"Yogi_Bear_79" wrote in message
...
I need to identify which rows have a blank cell in colum E. I then

need
to
move the data from:

F to E
G to F
H to G

I would like to do this without moving the data from the remaing

rows.

Manually I would filter by blank for that column, then delete the

affected
cells from column E. I would allow Excel to move the data to the

left.
I
would then go to column H and insert blank cells, moving the

remaining
rows
I~?? to the right




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Identify Blank Cells in Col & move coresponding data

Yes.

--
Regards,
Tom Ogilvy

"Yogi_Bear_79" wrote in message
...
Cool,

Tom,

Does this work because once the special cells (blanks are selected it
only works with those rows versus the entire column?


"Tom Ogilvy" wrote in message
...
Sub AATester1()
Dim rng As Range, rng1 As Range
On Error Resume Next
Set rng = Columns(5).SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
Set rng1 = Intersect(Columns(1), rng.EntireRow)
rng.Delete Shift:=xlToLeft
Set rng1 = Intersect(Columns(8), rng1.EntireRow)
rng1.Insert Shift:=xlToRight
End If
End Sub

--
Regards,
Tom Ogilvy

"Yogi_Bear_79" wrote in message
...
Ken,

That's a pretty cool way of doing that. But I do have data past col H,

that
needs to be shifted back. Also this would be preferable via VB. I

realize
I
can record the macro, but since these cells can differ, I didn't want

to
limit myself to certain rows.



"Ken Wright" wrote in message
...
Assuming nothing in the Cols past Column H, select the entire range

in
Col
E
that you want to fix, do Edit / Go To / Special / Blanks. Now do

Edit
/
Delete
/ Shift cells left.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03




--------------------------------------------------------------------------
--
It's easier to beg forgiveness than ask permission :-)



--------------------------------------------------------------------------
--



"Yogi_Bear_79" wrote in message
...
I need to identify which rows have a blank cell in colum E. I then

need
to
move the data from:

F to E
G to F
H to G

I would like to do this without moving the data from the remaing

rows.

Manually I would filter by blank for that column, then delete the
affected
cells from column E. I would allow Excel to move the data to the

left.
I
would then go to column H and insert blank cells, moving the

remaining
rows
I~?? to the right




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
move blank data reza Excel Discussion (Misc queries) 10 October 6th 09 10:49 AM
Macro to delete blank rows and move data/info samoan Excel Discussion (Misc queries) 3 September 19th 08 04:50 PM
identify a record that has a blank space in the data in a field. JH Excel Discussion (Misc queries) 5 October 20th 06 04:16 PM
How do I identify blank cells? peanburn New Users to Excel 6 February 19th 06 01:33 AM
Identify and move duplicate rows? ali Excel Programming 11 January 28th 04 06:19 AM


All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"