Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Is it possible to have rows labled A->Z and columns 0->n ?
I have a macro which fills cells on sheet2 with colors based on cells from
sheet 1. Sheet 2 is supposed to represent the physical pinout of a computer chip I am designing. The pinout diagrams published by the manufacturer show the top view of the chip, the rows, from top to bottom are labled A - AP, the columns are labled 1 - 34. This is the reverse of how rows and columns are displayed in Excel. I would like to change the labeling of the rows and columns in Excel to match the pinout diagram printed in manufacturers datasheet, is this possible? See page 279 of the following PDF file for an example of the pinout diagram I am trying to represent in my spreadsheet: http://direct.xilinx.com/bvdocs/userguides/ug075.pdf thanks, Kevin |
#2
|
|||
|
|||
You could use column A and row 1 as your headers and make them anything you
want. You could even hide excel's row and column headers: tools|option|view tab|uncheck row & column headers kevinm wrote: I have a macro which fills cells on sheet2 with colors based on cells from sheet 1. Sheet 2 is supposed to represent the physical pinout of a computer chip I am designing. The pinout diagrams published by the manufacturer show the top view of the chip, the rows, from top to bottom are labled A - AP, the columns are labled 1 - 34. This is the reverse of how rows and columns are displayed in Excel. I would like to change the labeling of the rows and columns in Excel to match the pinout diagram printed in manufacturers datasheet, is this possible? See page 279 of the following PDF file for an example of the pinout diagram I am trying to represent in my spreadsheet: http://direct.xilinx.com/bvdocs/userguides/ug075.pdf thanks, Kevin -- Dave Peterson |
#3
|
|||
|
|||
Hi Dave,
sorry I should have explained .. my macro uses the contents of cells on sheet1 as a pointer to the cells on sheet2 .. Example: (sheet1, values in columnA, first four rows) A1 AA3 AC2 B1 The macro uses the value (i.e. A1, AA3, etc) as a pointer to the destination cell for sheet2. Therefore simply hiding the row and colum header doesn't solve the problem, Kevin "Dave Peterson" wrote: You could use column A and row 1 as your headers and make them anything you want. You could even hide excel's row and column headers: tools|option|view tab|uncheck row & column headers kevinm wrote: I have a macro which fills cells on sheet2 with colors based on cells from sheet 1. Sheet 2 is supposed to represent the physical pinout of a computer chip I am designing. The pinout diagrams published by the manufacturer show the top view of the chip, the rows, from top to bottom are labled A - AP, the columns are labled 1 - 34. This is the reverse of how rows and columns are displayed in Excel. I would like to change the labeling of the rows and columns in Excel to match the pinout diagram printed in manufacturers datasheet, is this possible? See page 279 of the following PDF file for an example of the pinout diagram I am trying to represent in my spreadsheet: http://direct.xilinx.com/bvdocs/userguides/ug075.pdf thanks, Kevin -- Dave Peterson |
#4
|
|||
|
|||
So AA3 really refers to row 27, column 3? C27??
If yes, you could "transpose" those addresses in your code: Option Explicit Sub testme01() Dim TestAddr As Variant Dim iCtr As Long TestAddr = Array("A1", "AA3", "AC2", "B1") For iCtr = LBound(TestAddr) To UBound(TestAddr) MsgBox TestAddr(iCtr) & vbLf & myTranspose(TestAddr(iCtr)) Next iCtr End Sub Function myTranspose(str As Variant) As String Dim wks As Worksheet Dim TestRng As Range Set wks = Worksheets(1) Set TestRng = Nothing On Error Resume Next Set TestRng = wks.Range(str) On Error GoTo 0 If TestRng Is Nothing Then myTranspose = "Error" Else myTranspose = wks.Cells(TestRng.Column, TestRng.Row).Address(0, 0) End If End Function kevinm wrote: Hi Dave, sorry I should have explained .. my macro uses the contents of cells on sheet1 as a pointer to the cells on sheet2 .. Example: (sheet1, values in columnA, first four rows) A1 AA3 AC2 B1 The macro uses the value (i.e. A1, AA3, etc) as a pointer to the destination cell for sheet2. Therefore simply hiding the row and colum header doesn't solve the problem, Kevin "Dave Peterson" wrote: You could use column A and row 1 as your headers and make them anything you want. You could even hide excel's row and column headers: tools|option|view tab|uncheck row & column headers kevinm wrote: I have a macro which fills cells on sheet2 with colors based on cells from sheet 1. Sheet 2 is supposed to represent the physical pinout of a computer chip I am designing. The pinout diagrams published by the manufacturer show the top view of the chip, the rows, from top to bottom are labled A - AP, the columns are labled 1 - 34. This is the reverse of how rows and columns are displayed in Excel. I would like to change the labeling of the rows and columns in Excel to match the pinout diagram printed in manufacturers datasheet, is this possible? See page 279 of the following PDF file for an example of the pinout diagram I am trying to represent in my spreadsheet: http://direct.xilinx.com/bvdocs/userguides/ug075.pdf thanks, Kevin -- Dave Peterson -- Dave Peterson |
#5
|
|||
|
|||
Dave,
I think I follow what you are suggesting but I think that to transpose for every possible value of row/column the macro will quickly become unmanageable. If you look at that PDF I pointed to earlier you will see there are some 600+ pins (1000+ pins for another device I am looking at). That means that in ColumnA of sheet1 there could potentially be 600+ values, all of which would need to be transposed. Maybe I dont fully understand what it is you are proposing but to me it appears that what I am asking for is not practical. Below is the macro I am using currently, this is what I need to 'bolt' your transpose macro into. Let me know if you think it is viable and I will investigate further, regards, Kevin Sub Build_Diagram_Pin_Function() ' ' Build_Diagram_Pin_Function Macro ' Macro recorded 26/05/2005 by UBV2000 ' ' For r = 7 To 1154 mycellPtr = Sheets("Pinlist").Cells(r, 4).Value mycellSignal = Sheets("Pinlist").Cells(r, 7).Value mycellColor = Sheets("Pinlist").Cells(r, 7).Interior.ColorIndex Sheets("Diagram").Range(mycellPtr).Interior.ColorI ndex = mycellColor Sheets("Diagram").Range(mycellPtr).Value = mycellSignal Next r End Sub "Dave Peterson" wrote: So AA3 really refers to row 27, column 3? C27?? If yes, you could "transpose" those addresses in your code: Option Explicit Sub testme01() Dim TestAddr As Variant Dim iCtr As Long TestAddr = Array("A1", "AA3", "AC2", "B1") For iCtr = LBound(TestAddr) To UBound(TestAddr) MsgBox TestAddr(iCtr) & vbLf & myTranspose(TestAddr(iCtr)) Next iCtr End Sub Function myTranspose(str As Variant) As String Dim wks As Worksheet Dim TestRng As Range Set wks = Worksheets(1) Set TestRng = Nothing On Error Resume Next Set TestRng = wks.Range(str) On Error GoTo 0 If TestRng Is Nothing Then myTranspose = "Error" Else myTranspose = wks.Cells(TestRng.Column, TestRng.Row).Address(0, 0) End If End Function kevinm wrote: Hi Dave, sorry I should have explained .. my macro uses the contents of cells on sheet1 as a pointer to the cells on sheet2 .. Example: (sheet1, values in columnA, first four rows) A1 AA3 AC2 B1 The macro uses the value (i.e. A1, AA3, etc) as a pointer to the destination cell for sheet2. Therefore simply hiding the row and colum header doesn't solve the problem, Kevin "Dave Peterson" wrote: You could use column A and row 1 as your headers and make them anything you want. You could even hide excel's row and column headers: tools|option|view tab|uncheck row & column headers kevinm wrote: I have a macro which fills cells on sheet2 with colors based on cells from sheet 1. Sheet 2 is supposed to represent the physical pinout of a computer chip I am designing. The pinout diagrams published by the manufacturer show the top view of the chip, the rows, from top to bottom are labled A - AP, the columns are labled 1 - 34. This is the reverse of how rows and columns are displayed in Excel. I would like to change the labeling of the rows and columns in Excel to match the pinout diagram printed in manufacturers datasheet, is this possible? See page 279 of the following PDF file for an example of the pinout diagram I am trying to represent in my spreadsheet: http://direct.xilinx.com/bvdocs/userguides/ug075.pdf thanks, Kevin -- Dave Peterson -- Dave Peterson |
#6
|
|||
|
|||
I don't open attachments or download files. (Especially large files over
dialup!) But I thought you needed something to translate your codes to addresses. You may want to take a shot at explaining it in plain text. Maybe someone will see the solution and jump in. kevinm wrote: Dave, I think I follow what you are suggesting but I think that to transpose for every possible value of row/column the macro will quickly become unmanageable. If you look at that PDF I pointed to earlier you will see there are some 600+ pins (1000+ pins for another device I am looking at). That means that in ColumnA of sheet1 there could potentially be 600+ values, all of which would need to be transposed. Maybe I dont fully understand what it is you are proposing but to me it appears that what I am asking for is not practical. Below is the macro I am using currently, this is what I need to 'bolt' your transpose macro into. Let me know if you think it is viable and I will investigate further, regards, Kevin Sub Build_Diagram_Pin_Function() ' ' Build_Diagram_Pin_Function Macro ' Macro recorded 26/05/2005 by UBV2000 ' ' For r = 7 To 1154 mycellPtr = Sheets("Pinlist").Cells(r, 4).Value mycellSignal = Sheets("Pinlist").Cells(r, 7).Value mycellColor = Sheets("Pinlist").Cells(r, 7).Interior.ColorIndex Sheets("Diagram").Range(mycellPtr).Interior.ColorI ndex = mycellColor Sheets("Diagram").Range(mycellPtr).Value = mycellSignal Next r End Sub "Dave Peterson" wrote: So AA3 really refers to row 27, column 3? C27?? If yes, you could "transpose" those addresses in your code: Option Explicit Sub testme01() Dim TestAddr As Variant Dim iCtr As Long TestAddr = Array("A1", "AA3", "AC2", "B1") For iCtr = LBound(TestAddr) To UBound(TestAddr) MsgBox TestAddr(iCtr) & vbLf & myTranspose(TestAddr(iCtr)) Next iCtr End Sub Function myTranspose(str As Variant) As String Dim wks As Worksheet Dim TestRng As Range Set wks = Worksheets(1) Set TestRng = Nothing On Error Resume Next Set TestRng = wks.Range(str) On Error GoTo 0 If TestRng Is Nothing Then myTranspose = "Error" Else myTranspose = wks.Cells(TestRng.Column, TestRng.Row).Address(0, 0) End If End Function kevinm wrote: Hi Dave, sorry I should have explained .. my macro uses the contents of cells on sheet1 as a pointer to the cells on sheet2 .. Example: (sheet1, values in columnA, first four rows) A1 AA3 AC2 B1 The macro uses the value (i.e. A1, AA3, etc) as a pointer to the destination cell for sheet2. Therefore simply hiding the row and colum header doesn't solve the problem, Kevin "Dave Peterson" wrote: You could use column A and row 1 as your headers and make them anything you want. You could even hide excel's row and column headers: tools|option|view tab|uncheck row & column headers kevinm wrote: I have a macro which fills cells on sheet2 with colors based on cells from sheet 1. Sheet 2 is supposed to represent the physical pinout of a computer chip I am designing. The pinout diagrams published by the manufacturer show the top view of the chip, the rows, from top to bottom are labled A - AP, the columns are labled 1 - 34. This is the reverse of how rows and columns are displayed in Excel. I would like to change the labeling of the rows and columns in Excel to match the pinout diagram printed in manufacturers datasheet, is this possible? See page 279 of the following PDF file for an example of the pinout diagram I am trying to represent in my spreadsheet: http://direct.xilinx.com/bvdocs/userguides/ug075.pdf thanks, Kevin -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I sort by row instead of by column? | Excel Worksheet Functions | |||
Transposing a column to several rows | Excel Discussion (Misc queries) | |||
moving alternating rows to a column with the order staying the sam | Excel Discussion (Misc queries) | |||
MACRO - copy rows based on value in column to another sheet | Excel Discussion (Misc queries) | |||
every nth cell by columns not rows.... | Excel Worksheet Functions |