Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default insert cell content and shift cells down

i have a list of 4 periods from 1-4 located in cells B1 to B4 as follows

Period 1
Period 2
Period 3
Period 4

I would like the text TA inserted depending on the numeric value of Cell A1.
So if Al=2 TA would be inserted between Period 1 and Period 2 as follows:

Period 1
TA
Period 2
Period 3
Period 4

or if A1=3 the following would occur:

Period 1
Period 2
TA
Period 3
Period 4

I would perfer that a worksheet function accomplish this task rather than a
macro. Please help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default insert cell content and shift cells down

One formulas play venture ..

Assuming source data is placed like this in B1:B5

TA
Period 1
Period 2
Period 3
Period 4

Note: TA must be placed in the top cell (ie in B1).
The rest of the periods can be in any order within B2:B5

And you have in A1: 2
with the number denoting where you want the "TA" to be placed relatively

Put in C1:
=IF(B1="TA",A$1+ROW()/10^10,SUBSTITUTE(B1,"Period","")+ROW()/10^10)

Put in D1:
=INDEX(B:B,MATCH(SMALL(C:C,ROW()),C:C,0))
Select C1:D1, copy down to D5. Hide away col C.
D1:D5 will return the required results.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Prohock" wrote:
i have a list of 4 periods from 1-4 located in cells B1 to B4 as follows

Period 1
Period 2
Period 3
Period 4

I would like the text TA inserted depending on the numeric value of Cell A1.
So if Al=2 TA would be inserted between Period 1 and Period 2 as follows:

Period 1
TA
Period 2
Period 3
Period 4

or if A1=3 the following would occur:

Period 1
Period 2
TA
Period 3
Period 4

I would perfer that a worksheet function accomplish this task rather than a
macro. Please 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
How to split Cell content into two resulting cells [email protected] Excel Worksheet Functions 1 October 23rd 06 12:30 PM
Excel should merge cells without removing content of any cell Rumpa Biswas Excel Discussion (Misc queries) 14 January 1st 06 12:32 AM
copying content of cell automatically to multiple cells PAUL GRAZIDE Excel Worksheet Functions 1 June 4th 05 06:52 PM
insert the content of a cell into a header/footer subscriptionsink Excel Discussion (Misc queries) 1 May 26th 05 07:40 PM
Put an autoshape in a cell based on another cells content Jo Excel Worksheet Functions 7 November 12th 04 04:34 PM


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