Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default how to transfer #'s from one column to the next

I am setting up a spreadsheet (budget purposes) and what I am trying to do is
when you enter the budget number and amount in 2 separate columns, I want the
amount to automatically go under the budget number on the spreadsheet. Any
suggestions? I know excel pretty good, but am not the greatest with
forumulas.
--
TP
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default how to transfer #'s from one column to the next

right click on the worksheet and put in code like this.

Assume the budget amount will be placed in cell B2 and the budget number in A2

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrHandler
If Target.Address = "$B$2" Then
Application.EnableEvents = False

s = Target.Offset(0, -1).Value
Target.Offset(0, -1).ClearContents
Set rng = Cells.Find(What:=s, _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not rng Is Nothing Then
If IsEmpty(rng.Offset(1, 0)) Then
Set rng = rng.Offset(1, 0)
Else
Set rng = rng.End(xlDown)(2)
End If
rng.Value = Target
Target.ClearContents
Else
MsgBox s & " was not found"
End If
End If
ErrHandler:
Application.EnableEvents = True
End Sub

This is just a guess since I don't know anything about the layout of your
sheet.

--
Regards,
Tom Ogilvy



"Tonya" wrote:

I am setting up a spreadsheet (budget purposes) and what I am trying to do is
when you enter the budget number and amount in 2 separate columns, I want the
amount to automatically go under the budget number on the spreadsheet. Any
suggestions? I know excel pretty good, but am not the greatest with
forumulas.
--
TP

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
need formula: # entered in column B will transfer to column D JENAB Excel Worksheet Functions 5 November 1st 08 05:11 AM
transfer a column into a row? Joe Excel Discussion (Misc queries) 2 April 9th 08 10:53 PM
add numbers in a column and transfer result to another column planecents Excel Worksheet Functions 3 March 2nd 07 06:05 PM
Column transfer Vaquero Excel Programming 0 August 8th 06 06:12 AM
transfer data from one column into another column Wessel Excel Discussion (Misc queries) 5 January 11th 06 11:48 PM


All times are GMT +1. The time now is 11:57 PM.

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"