Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Can I do Excel formula that variably shifts columns right or left

I need to learn how to shift data right or left in columns based upon an
input. For instance, let's say I take 10 orders in January. I have a
constant value that assumes it will take me 4 months to build them. I then
want to show 10 sales in May (4 months after order). If I change the
manufacturing assumption to 3 months, I want the 10 sales to reflect in
April, one column to the left.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Can I do Excel formula that variably shifts columns right or left

On Nov 14, 1:08*pm, siteguy wrote:
I need to learn how to shift data right or left in columns based upon an
input. *For instance, let's say I take 10 orders in January. *I have a
constant value that assumes it will take me 4 months to build them. *I then
want to show 10 sales in May (4 months after order). *If I change the
manufacturing assumption to 3 months, I want the 10 sales to reflect in
April, one column to the left.


In VBA, you can access a column with Columns property. The following
code is a Sub that would take the values from a source column (source)
and put them into a destination column (dest).

Sub moveColumn(source As Integer, dest As Integer)

ActiveSheet.Columns(source).Value = ActiveSheet.Columns
(dest).Value
ActiveSheet.Columns(source).Delete

End Sub
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
formula for shifts from times jcontrer Excel Discussion (Misc queries) 2 September 17th 08 04:02 PM
In Excel My Columns are going from right to left, how can I fix i. N 1000 Excel Discussion (Misc queries) 1 November 9th 07 12:34 AM
Text shifts left in Excel Combo Box when user types in entry shearston1010 Excel Discussion (Misc queries) 0 October 20th 05 03:49 PM
Summing a variably-sized range Titan Excel Worksheet Functions 1 August 26th 05 06:20 AM
How do I drag a formula from right to left columns instead of rig. matt Excel Discussion (Misc queries) 3 December 12th 04 01:08 AM


All times are GMT +1. The time now is 08:26 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"