#1   Report Post  
Posted to microsoft.public.excel.misc
GARY
 
Posts: n/a
Default Relative references

B1 contains an "old" value; C1 contains its "new" value
B47 contains an "old" value; C2 contains its "new" value
B93 contains an "old" value; C3 contains its "new" value
B139 contains an "old" value; C4 contains its "new" value

How do write a formula to replace the respective "old" values with
their "new" values?

  #2   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default Relative references

Try this:

=INDIRECT("B"&1+46*(ROW()-1))

HTH,
Elkar


"GARY" wrote:

B1 contains an "old" value; C1 contains its "new" value
B47 contains an "old" value; C2 contains its "new" value
B93 contains an "old" value; C3 contains its "new" value
B139 contains an "old" value; C4 contains its "new" value

How do write a formula to replace the respective "old" values with
their "new" values?


  #3   Report Post  
Posted to microsoft.public.excel.misc
GARY
 
Posts: n/a
Default Relative references

Hi Elkar,

Your formula doesn't refer to Col C.

gary

  #4   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default Relative references

Nope, it should be entered in Column C, then copied down.

"GARY" wrote:

Hi Elkar,

Your formula doesn't refer to Col C.

gary


  #5   Report Post  
Posted to microsoft.public.excel.misc
excelent
 
Posts: n/a
Default Relative references

in VBA try this:

Sub test()
Dim r
For r = 0 To 9
Cells(r * 46 + 1, 2) = Cells(r + 1, 3)
Next
End Sub



  #6   Report Post  
Posted to microsoft.public.excel.misc
GARY
 
Posts: n/a
Default Relative references

I thought it be best to provide an example of my spreadsheet.
(I've changed the rows and columns to fit the posting space)

I want to 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 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

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 switch between relative and absolute references KeKe New Users to Excel 2 June 9th 06 05:23 PM
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


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

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"