Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Delete columns values inbetween

Hi,

I have a set of dates in a columnA.
User is prompted to select a row of these rows (using Inputbox option).
Based on user's selection (suppose Row#7), the values will be copied to a
new columnB retaining First value, Last value and the selected value(row# 7).

Sl # Plan Date ColA

1 24/06/2006
2 01/07/2006
3 08/07/2006
4 15/07/2006
5 22/07/2006
6 29/07/2006
7 05/08/2006
8 12/08/2006
9 19/08/2006
10 26/08/2006
11 02/09/2006
12 09/09/2006

After user selection of row#7, the new column will have the data as below:

Sl # Plan Date ColA

1 24/06/2006
2
3
4
5
6
7 05/08/2006
8
9
10
11
12 09/09/2006

Thanks. Appreciate your help...
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Delete columns values inbetween

Sub Test()
Dim iLastRow As Long
Dim cell As Range
Dim i As Long

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
Set cell = Application.InputBox("select cell to copy", Type:=8)
If Not cell Is Nothing Then
Range("A1").Copy Range("B1")
cell.Copy Cells(cell.Row, "B")
Cells(iLastRow, "A").Copy Cells(iLastRow, "B")
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dimri" wrote in message
...
Hi,

I have a set of dates in a columnA.
User is prompted to select a row of these rows (using Inputbox option).
Based on user's selection (suppose Row#7), the values will be copied to a
new columnB retaining First value, Last value and the selected value(row#

7).

Sl # Plan Date ColA

1 24/06/2006
2 01/07/2006
3 08/07/2006
4 15/07/2006
5 22/07/2006
6 29/07/2006
7 05/08/2006
8 12/08/2006
9 19/08/2006
10 26/08/2006
11 02/09/2006
12 09/09/2006

After user selection of row#7, the new column will have the data as below:

Sl # Plan Date ColA

1 24/06/2006
2
3
4
5
6
7 05/08/2006
8
9
10
11
12 09/09/2006

Thanks. Appreciate your help...



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
Copy columns values into separate columns Mike_can Excel Discussion (Misc queries) 7 May 27th 06 12:32 AM
Delete row containing all previous values. mohd21uk via OfficeKB.com New Users to Excel 1 May 10th 06 01:57 PM
Function to find duplicate values, then delete Cam Excel Worksheet Functions 1 January 27th 06 01:38 AM
I can't delete columns - help! dcleesfo Excel Worksheet Functions 3 September 16th 05 02:00 AM
Formula to delete blank cells across multiple columns? SamFunMail Excel Worksheet Functions 2 September 1st 05 07:05 AM


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

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

About Us

"It's about Microsoft Excel"