Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gcotterl
 
Posts: n/a
Default Relative references

In the example below, how do I write a formula that will replace:

the middle word in C1 with the word in B1
the middle word in C10 with the word in B2
the middle word in C19 with the word in B3
the middle word in C28 with the word in B4
the middle word in C37 with the word in B5

(Column D contains the desired results)


B C D
1 pig cat dog horse cat pig horse
2 cow
3 pansy
4 rat
5 mouse
6
7
8
9
10 duck fish flea duck cow flea
11
12
13
14
15
16
17
18
19 mutt ant bee mutt pansy bee
20
21
22
23
24
25
26
27
28 hog puppy bug hog rat bug
29
30
31
32
33
34
35
36
37 mule germ fly mule mouse fly



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default Relative references

Not sure what "relative reference" has to do with this problem that looks
like a homework assignment.
Try this in C1 and then copy it to the other cells
=LEFT(C1,FIND(" ",C1))&INDIRECT("B"&INT(ROW()/9)+1)&"
"&RIGHT(C1,LEN(C1)-FIND("*",SUBSTITUTE(C1," ","*",2)))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"gcotterl" wrote in message
...
In the example below, how do I write a formula that will replace:

the middle word in C1 with the word in B1
the middle word in C10 with the word in B2
the middle word in C19 with the word in B3
the middle word in C28 with the word in B4
the middle word in C37 with the word in B5

(Column D contains the desired results)


B C D
1 pig cat dog horse cat pig horse
2 cow
3 pansy
4 rat
5 mouse
6
7
8
9
10 duck fish flea duck cow flea
11
12
13
14
15
16
17
18
19 mutt ant bee mutt pansy bee
20
21
22
23
24
25
26
27
28 hog puppy bug hog rat bug
29
30
31
32
33
34
35
36
37 mule germ fly mule mouse fly





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson
 
Posts: n/a
Default Relative references

gcotterl wrote:
In the example below, how do I write a formula that will replace:

the middle word in C1 with the word in B1
the middle word in C10 with the word in B2
the middle word in C19 with the word in B3
the middle word in C28 with the word in B4
the middle word in C37 with the word in B5

(Column D contains the desired results)


B C D
1 pig cat dog horse cat pig horse
2 cow
3 pansy
4 rat
5 mouse
6
7
8
9
10 duck fish flea duck cow flea
11
12
13
14
15
16
17
18
19 mutt ant bee mutt pansy bee
20
21
22
23
24
25
26
27
28 hog puppy bug hog rat bug
29
30
31
32
33
34
35
36
37 mule germ fly mule mouse fly


Hi,

Just an small improvement so that errors are not seen...

=IF(ISBLANK(C1),"",LEFT(C1,FIND(" ",C1))&INDIRECT("B"&INT(ROW()/9)+1)
&" "&RIGHT(C1,LEN(C1)-FIND("*",SUBSTITUTE(C1," ","*",2))))

Ken Johnson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gcotterl
 
Posts: n/a
Default Relative references

Hi Bernard,

"relative reference"

I was looking for an expression that would "refer":

B1 to C1
B2 to C10
B3 to C19
B4 to C28
B5 to C37

Gary




"Bernard Liengme" wrote:

Not sure what "relative reference" has to do with this problem that looks
like a homework assignment.
Try this in C1 and then copy it to the other cells
=LEFT(C1,FIND(" ",C1))&INDIRECT("B"&INT(ROW()/9)+1)&"
"&RIGHT(C1,LEN(C1)-FIND("*",SUBSTITUTE(C1," ","*",2)))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"gcotterl" wrote in message
...
In the example below, how do I write a formula that will replace:

the middle word in C1 with the word in B1
the middle word in C10 with the word in B2
the middle word in C19 with the word in B3
the middle word in C28 with the word in B4
the middle word in C37 with the word in B5

(Column D contains the desired results)


B C D
1 pig cat dog horse cat pig horse
2 cow
3 pansy
4 rat
5 mouse
6
7
8
9
10 duck fish flea duck cow flea
11
12
13
14
15
16
17
18
19 mutt ant bee mutt pansy bee
20
21
22
23
24
25
26
27
28 hog puppy bug hog rat bug
29
30
31
32
33
34
35
36
37 mule germ fly mule mouse fly






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson
 
Posts: n/a
Default Relative references

gcotterl wrote:
Hi Bernard,

"relative reference"

I was looking for an expression that would "refer":

B1 to C1
B2 to C10
B3 to C19
B4 to C28
B5 to C37

Gary


Hi Gary,

I think Bernard meant to say "Try this in D1 etc" not "Try this in C1
etc"

Ken Johnson

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
Named formulas in CHOOSE need to be Relative references when paste bill ch Excel Worksheet Functions 2 April 10th 06 04:13 PM
I want chart source data to be relative references, not absolute. Bob Mc Charts and Charting in Excel 1 April 7th 06 02:53 PM
Confused about relative references in named formulas [email protected] Excel Worksheet Functions 1 March 22nd 06 10:40 PM
Averaging using relative references across sheets [email protected] Excel Discussion (Misc queries) 0 January 30th 06 01:57 PM
How can I enable the "Record Using Relative References" option in. cbaugher Excel Discussion (Misc queries) 1 January 31st 05 03:32 PM


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