#### Use a cell's value as row number for another cell in Excel

```Excel XP:  I'm trying to use the values in one row of cells (D1:F1) as the
reference for the row value for a different series of cells (D2:F4).  For
example:
Column      A           B         C         D        E        F
Row 1      1000        30      170       1         2       3
2      1500        60      190
3      1200        20      175
I want to get the following cells to equal:
D2=1000  (In other words: D2 = A1);  D3=30   (In other words: F2 = B1);
E2=1500  (In other words: E2 = A2);   E3=60  (In other words: F2 = B2);
F2=1200  (In other words: F2 = A3);   F3=20   (In other words: F2 = B3);
....
F4=175    (In other words: F4 = C3);

Hope the explanation makes sense....I'd appreciate any help!
D. Hay
```
 0
DHay (3)
10/12/2004 1:13:03 PM
excel.misc 78881 articles. 5 followers.

4 Replies
1177 Views

Similar Articles

[PageSpeed] 9

```Your example is somewhat confusing, but use this in D2
and fill to F2:

=OFFSET(\$A\$1,COLUMN()-4,)

to pull in A1 to A3.

HTH
Jason
Atlanta, GA

>-----Original Message-----
>Excel XP:  I'm trying to use the values in one row of
cells (D1:F1) as the
>reference for the row value for a different series of
cells (D2:F4).  For
>example:
> Column      A           B         C         D
E        F
>Row 1      1000        30      170       1
2       3
>       2      1500        60      190
>       3      1200        20      175
>I want to get the following cells to equal:
>D2=1000  (In other words: D2 = A1);  D3=30   (In other
words: F2 = B1);
>E2=1500  (In other words: E2 = A2);   E3=60  (In other
words: F2 = B2);
>F2=1200  (In other words: F2 = A3);   F3=20   (In other
words: F2 = B3);
>....
>F4=175    (In other words: F4 = C3);
>
>Hope the explanation makes sense....I'd appreciate any
help!
>D. Hay
>.
>
```
 0
jason.morin (561)
10/12/2004 1:28:58 PM
```You can use VBA to do this, but it might be a little clumsy.

For example, to fill D2 and E2, you need the code:

Range("D2") = Range("a" & Range("d1").value)
Range("E2") = Range("a" & Range("e1").value)
.... and so on for the other cells.

I noticed that what you are essentially doing is transposing the data, the
other way to do this is to copy A1:C3, and then click on cell D2, use Edit >
Paste Special and then tick the box next to "transpose".  This will put the
data into the correct cells for you.

Hope it helps
Katie

"D. Hay" wrote:

> Excel XP:  I'm trying to use the values in one row of cells (D1:F1) as the
> reference for the row value for a different series of cells (D2:F4).  For
> example:
>  Column      A           B         C         D        E        F
> Row 1      1000        30      170       1         2       3
>        2      1500        60      190
>        3      1200        20      175
> I want to get the following cells to equal:
> D2=1000  (In other words: D2 = A1);  D3=30   (In other words: F2 = B1);
> E2=1500  (In other words: E2 = A2);   E3=60  (In other words: F2 = B2);
> F2=1200  (In other words: F2 = A3);   F3=20   (In other words: F2 = B3);
> ...
> F4=175    (In other words: F4 = C3);
>
> Hope the explanation makes sense....I'd appreciate any help!
> D. Hay
```
 0
Katie (75)
10/12/2004 1:51:06 PM
```Thank you very much for your replies.  However, I am not sure if my
explanation was very clear.  I will try again.
If: B2=56; I want want a formula that uses the value of B2 as the row number
for B3.  Therefore, B3=(\$A[value of B2]).

I have a huge number of columns from which I need to extract data at
specific points, but those positions change from column to column and sheet
to sheet.  Therefore, I need a formula that automatically gives me the value
using the row I have selected....

Does this make any more sense???

Thanks!

"D. Hay" wrote:

> Excel XP:  I'm trying to use the values in one row of cells (D1:F1) as the
> reference for the row value for a different series of cells (D2:F4).  For
> example:
>  Column      A           B         C         D        E        F
> Row 1      1000        30      170       1         2       3
>        2      1500        60      190
>        3      1200        20      175
> I want to get the following cells to equal:
> D2=1000  (In other words: D2 = A1);  D3=30   (In other words: F2 = B1);
> E2=1500  (In other words: E2 = A2);   E3=60  (In other words: F2 = B2);
> F2=1200  (In other words: F2 = A3);   F3=20   (In other words: F2 = B3);
> ...
> F4=175    (In other words: F4 = C3);
>
> Hope the explanation makes sense....I'd appreciate any help!
> D. Hay
```
 0
DHay (3)
10/12/2004 2:59:02 PM
```I don't think that you can do this without using VBA, an option would be to
write your own function which you can type into the cell, for example B3.
You might like to try the following:

Function PasteData(DestinationColumn As Range, DestinationRow)
CopyColumn = DestinationColumn.Column
CopyRow = DestinationRow
PasteData = Cells(CopyRow, CopyColumn)
End Function

Then when you are in excel, in Cell B3 type the following:
=PasteData(A1,B2)

This should work ;)

Obviously, you can rename the function to whatever suits you.

The reference to A1 only takes the column information from the cell, so any
cell in row A will work here, it just makes it possible to copy the formula,
if you need to.

Hope that this solves your problem.

Katie

"D. Hay" wrote:

> Thank you very much for your replies.  However, I am not sure if my
> explanation was very clear.  I will try again.
> If: B2=56; I want want a formula that uses the value of B2 as the row number
> for B3.  Therefore, B3=(\$A[value of B2]).
>
> I have a huge number of columns from which I need to extract data at
> specific points, but those positions change from column to column and sheet
> to sheet.  Therefore, I need a formula that automatically gives me the value
> using the row I have selected....
>
> Does this make any more sense???
>
> Thanks!
>
>
> "D. Hay" wrote:
>
> > Excel XP:  I'm trying to use the values in one row of cells (D1:F1) as the
> > reference for the row value for a different series of cells (D2:F4).  For
> > example:
> >  Column      A           B         C         D        E        F
> > Row 1      1000        30      170       1         2       3
> >        2      1500        60      190
> >        3      1200        20      175
> > I want to get the following cells to equal:
> > D2=1000  (In other words: D2 = A1);  D3=30   (In other words: F2 = B1);
> > E2=1500  (In other words: E2 = A2);   E3=60  (In other words: F2 = B2);
> > F2=1200  (In other words: F2 = A3);   F3=20   (In other words: F2 = B3);
> > ...
> > F4=175    (In other words: F4 = C3);
> >
> > Hope the explanation makes sense....I'd appreciate any help!
> > D. Hay
```
 0
Katie (75)
10/13/2004 7:07:01 AM

Similar Artilces:

Outlook using imap is receiving but not sending
Messages are being put in Sent folder and Send/Receive shows no errors but emails are not actually getting sent. This is a new install of Outlook on a new computer. Have I messed up the setup? "Theatre Girl" wrote in message news:64BB711F-FE56-440C-A850-DADCA8C3BA00@microsoft.com... > Messages are being put in Sent folder and Send/Receive shows no > errors but > emails are not actually getting sent. This is a new install of > Outlook on a > new computer. Have I messed up the setup? IMAP is not a sending protocol. It is used for receiving mails (out of your ...

Line charts using temperature and time factors
I want to create a line chart showing comparisons of heating and time. For example one item is held @ 30deg for 10secs then 100degs for 30secs while the comparison is plotted to show the difference. Help appreciated. try x-y scatter chart data-columnwise. Excelon_Ls <Excelon_Ls@discussions.microsoft.com> wrote in message news:6B9F5547-A35C-4272-9FDC-F2CE6122D783@microsoft.com... > I want to create a line chart showing comparisons of heating and time. For > example one item is held @ 30deg for 10secs then 100degs for 30secs while the > comparison is plotted to show the diff...

character limit in cell?
I merged several cells and entered text. I have it set to 'wrap text' so it will all fit in the merged cells. If the text is only 1/2 of the third row it is all displayed. However, if I enter any more text than that it displays as '#######'. Is there a limit on the number of characters I can enter? Can that be changed. There is still room in the merged cells to hold more text. Abby, You don't seem to be getting any takers on this one. ####, to my knowledge, shows up only when you have a number in a cell (not text), and it's too big to display in its entir...

VBA: move to the next cell down from anywhere in the sheet
I am deleting rows based on a value in a column (< 16) and if the valu is 16 or greater I want to move down to the next row and check tha value and so on. i am using a Do Until value = "". What is the code for moving down to the next cell below ActiveCell -- jm ----------------------------------------------------------------------- jmp's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2903 View this thread: http://www.excelforum.com/showthread.php?threadid=48770 Activecell.Offset(1,0).Select I would not recommend this though. If you want to dele...

HOW TO USE HYPERLINK within a droplist?
I have a question aabout this: eg. I set row A with validation list "yes/no", i want that if choose "yes", then open a word document named "checklist.doc". Instead of using a validation list, you could use a "yes" button and a "no" button. The yes button can be linked to a macro to open the word document. The no button can be linked to a macro the will type the text "Go to next step" or something like that. "Bonny" wrote: > I have a question aabout this: > eg. > I set row A with validation list "yes...

using forms
Vista Home Premium 32 / Outlook 2007 I have created some forms that used to work. No more. On selecting a form, I get "The form required to view this message cannot be displayed. Contact the administrator. To my knowledge, I am the administrator. This is a stand-alone PC in my residence. If I go to Manage User Accounts, it shows only 2 accounts - LastName Administrator and Guest. I have googled my problem and found references to FRMCACHE.DAT which I am told to delete and restart Outlook. Did that. Opened Outlook and tried to open a form. Same error. And FRMCACHE.DAT was not ...

Excel Display Errors in file
I have several excell 2000 documents that when opened, the first sheet in the workbook will display most of the data at around a size 72 font that will not show in the cell. All the other sheets in this workbook are fine. This also effects the column and row headings (A B C, 1 2 3). If I go to View > Zoom and zoom from the default of 75% to anything else, it fixes the problem. I can then zoom back to 75% and everything still looks fine. (Including row and column headings) The next time I open the file, the first sheet is still messed up. I have tried saving to web page and...

Using Spanish on Publisher
I have copied and pasted a document in Spanish from Word to Publisher. Prompts keep coming up telling me that it cannot "hyphenate" this document. I'm guessing that it means since it's in another language it needs something to be able to spell-check, etc. I really don't care about checking the spelling, but the pop-ups keep interferring with my arranging the flyer I desperately need to get completed. It tells me to put in the disk and download the "hyphenate" feature. Can I download this from the net since I have no disks. Publisher came with my n...

Printing Problems (cells printing on top of one another)
When printing cells are merged together like the they have been shifted up half a row height. This problem is restriced to one user on one system (Windows 2000 Pro and Office 2000). The problem is same on a single sheet workbook or a multi sheet workbook. The printer setting keep reverting back to 11 sheet tall by 1 sheet wide. This produces an unclear image through print preview. You can manually reset the default to 1 sheet wide by 1 sheet long which corrects the print preview but not the printed output. I avoid merged cells like the plague - full of problems. I guess that you ...

I used Omsgclas.exe Utility and my contacts don't use then new form
I created a new form for contacts. I followed the three steps in the document How to Update Existing Items to Use a New Custom Form. I can click on Action and do new contact and the new form is used. I used Omsgclas.exe utility to change the message class of the contacts. It shows as changed. However, when I click on an old contact (previous to changing the form), A message form comes up (not the old contact form and not my new contact form). Anyone have any help how to get my new form pulled up for old messages? Note: I had a form with a ' in the name, I made a new form w...

FormulaR1C1 using variables
I want to do this but can't: ActiveCell.FormulaR1C1 = "=MyFunction(R[variable]C[variable])" What are my options? Try something like ActiveCell.FormulaR1C1 = _ "=MyFunction(R" & CStr(variable) & "C" & CStr(variable) & ")" Cordially, Chip Pearson Microsoft Most Valuable Professional, Excel, 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com On Wed, 21 Apr 2010 13:52:01 -0700, Cheah <Cheah@discussions.microsoft.com> wrote: >I want to do this but can't: > >ActiveCell.Fo...

Formula staying as a formula in a cell?
Does anyone know why a formula stays a formula in a cell? I know that using the aspostrophe makes it like a string, like '=blah+blah, but this one doesn't...I even have made the cell General and made sure that calculate automatic was selected. This thing is driving me nuts. Any suggestions??? You can't just format the cell as general if it was text to start with. You need to format as general AND then hit F2 and then enter. the other possibility is that you have the Formulas view turned on in Tools / Options / View Tab / Uncheck Show Formulas in Window options. Ideally you...

In Excel, how do I insert User Name (author) in a cell.
The function =CELL("filename",A1) returns a file name and sheet name in a cell. How can I obtain the User Name? You can write some VBA to do it. Sub Return_UserName() Sheets("sheet1").Range("A2").Value = Application.UserName End Sub -- Excel_Geek ------------------------------------------------------------------------ Excel_Geek's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=26423 View this thread: http://www.excelforum.com/showthread.php?threadid=398347 And to return just the filename (if you like) you can use this for...

High number of page faults per second, but has enough memory?
Hi, I'm having a problem with an application, it easily has enough physical RAM but it's generating a very large number of page faults (2000 per second). Does anyone know why this might be? ...

Change range based on value of a cell
Hi all, I'm trying to do a COUNTIF, but want to change the range depending on a number somewhere else in the spreadsheet. For example, if the number is 3, I want to count from C1:G1, but if the number is 4 I want to count from D1:G1. I've used the address function to find out which cell I want to start from, and then concatenated that to the end point of the range (this never changes). So I'm left with a cell that contains the value of the range (C1:G1 or D1:G1) depending upon the number which is input above. Is it possible to use this cell, which contains the value C1:G1 to repl...

Using XML with ASP.NET
I want to know where can I find Tutorials/Articles to learn implementing XML with asp.net. I am working on ASP.NET using C# from last one month. I have idea about XML but had not implemented yet with ASP.NET. Thanks in advance. Thanks Vinod Jajoo ...

Using lookup formula using more than one cell
I have a spreadsheet which lists clients by first name, last name, postcode and phone number - all in separate columns e.g. Andy Roberts M56 7HN 0161 428 3856 I have these all in one worksheets and in a named range called "Clients" On a separate worksheet (within the same workbook) I log all my enquiries. What I want to be able to do is type in to a cell the first name then in the next cell the last name and the following cells get populated with postcode and phone number based on BOTH of the first two cells by looking up the "Clients" range. I can get it...

Average of Numbers in Top 5
How do I tell excel to look at only the top x numbers in a list of values? For example, if I have 100 scores and I want Excel to calculate the average of the top 10 scores, how do I do that? Thanks One way =AVERAGE(LARGE(\$A\$1:\$A\$100,ROW(INDIRECT("1:10")))) entered with ctrl + shift & enter regards, Peo Sjoblom "Jake" wrote: > How do I tell excel to look at only the top x numbers in a list of values? > For example, if I have 100 scores and I want Excel to calculate the average > of the top 10 scores, how do I do that? > > Thanks =AVERAGE(LA...

Using secured OMA
Hi, Please help me with my misunderstanding. When I try ro connect by t68i or z600 (WAP 2.0) to OMA directly with SSL required, using mydomain.com/oma, of course, I get 403 error. When I use https://mydomain.com/oma I get "Couldn't reach the indicated web server." altough it works fine with Pocket PC. What's wrong? What should I configure to establish secured connection from mobile phone? Best regards, Vit Knyshevich. "Vit Knyshevich" <abuse_vit_knysh@hotmail.com> wrote: >Please help me with my misunderstanding. When I try ro connect by t68i or >z60...

Find values of properties of checkbox
How do you find the values of a property (such as whether or not they are checked) when the check boxes have been created on the fly? Any help would be much appreciated! *** Sent via Developersdex http://www.developersdex.com *** "Mike P" <mike.parr@gmail.com> wrote in message news:OBhh2ds4KHA.1924@TK2MSFTNGP06.phx.gbl... > How do you find the values of a property (such as whether or not they > are checked) when the check boxes have been created on the fly? Is it a Web or WinForms application? If you did not keep a Reference to the checkboxe...

Importing Excel data into Access?
Can Excel data be imported into Access easily!? I know from Word table I can simply copy and paste but it is not that easy when doing from Excel to Access! I downloaded this manual from http://www.mousetraining.co.uk/training-manuals/Access2003Intro.pdf but couldn't find this topic If anyone knows please let me know! Cheers Raj Hello, there are plenty of sources. e.g.: http://office.microsoft.com/training/training.aspx?AssetID=RC102722321033 Stefan. "Rajeev Rawat" wrote: > Can Excel data be imported into Access easily!? I know from Word table &g...

How do I import Excel into Microsoft Money
#1 - This question is more likely to get an answer in the Money newsgroup than here #2 - Place your question in the body of the message, with a little more explanation of what you want to accomplish "Tax Help" wrote: > You can't do it directly. The only formats that Money can import are QIF and OFX. Go to Google and search for excel money import qif to get multiple hits including macros and/or commercial solutions. One the I found is http://www.bigredconsulting.com/AboutXLQIFConverter.htm Their program is \$39. On Mon, 21 Mar 2005 12:55:03 -0800, "Tax H...

Compile error using CTypedPtrList
Hi, I am having problems at compile time using the following line: CTypedPtrList<CPtrList, CString*> m_ClientList ; When compiled I get the following errors: emailcfgdlg.h(114) : error C2143: syntax error : missing ';' before '<' emailcfgdlg.h(114) : error C2501: 'CTypedPtrList' : missing storage-class or type specifiers emailcfgdlg.h(114) : error C2059: syntax error : '<' emailcfgdlg.h(114) : error C2238: unexpected token(s) preceding ';' I am using the version 6 of the compiler with SP5. Now I think this is something to do with the c...

Inner Borders in Excel 2007
Before in pre-Excel 2007 world, I used to be able to select a range of cells, click on a button to get vertical or horizontal boarders for the range selected. In Excel 2007 I can only apply outer boarders. Was this feature removed? I now have go to "format cells", then select the "borders" tab to do the same. Where did the buttons for inner vertical/horizontal boarders go? Thanks. louishong - Home ribbon > (Font group) drop down between Underline and Fill Color - Mike http://www.MikeMiddleton.com <louishong@lycos.com> wrote in message...

scatter plots using pivot table data
In older versions of Excel, you could directly create xy scatter plots using pivot table data. In Excel 2000, the chart wizard says you can't use an xy scatter plot with pivot table data. Why????? Is there any way around this limitation? Dan - Don't tell the pivot table you're making a regular chart. Select a cell away from the PT and start the chart wizard. Select the XY Scatter type you want in step 1. In step 2, use the Series tab to select the ranges for the names, X values, and Y values of each series in your chart. Make sure you don't select one of the PT but...