ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help Using EntireColumn (https://www.excelbanter.com/excel-programming/434026-help-using-entirecolumn.html)

Ayo

Help Using EntireColumn
 
I am trying the assign the value in the first cell in the activecolumn to a
cell in another worksheet. Below is the "EntireColumn" version of the same
formular

reportWS.Range("A" & reportCurrentRow & "") =
c.EntireRow.Cells(reportCurrentRow, 3)

reportWS.Range("D" & reportCurrentRow
&"")=c.EntireColumn.Cells(reportCurrentRow, X)

How would I figure out what X is?

Jacob Skaria

Help Using EntireColumn
 
If I understand you correctly;

Cells(1, ActiveCell.Column)

will give you the value of cell 1 or Row1 of the active cell/column

reportWS.Range("D" & reportCurrentRow) = Cells(1, ActiveCell.Column)


If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

I am trying the assign the value in the first cell in the activecolumn to a
cell in another worksheet. Below is the "EntireColumn" version of the same
formular

reportWS.Range("A" & reportCurrentRow & "") =
c.EntireRow.Cells(reportCurrentRow, 3)

reportWS.Range("D" & reportCurrentRow
&"")=c.EntireColumn.Cells(reportCurrentRow, X)

How would I figure out what X is?


Ayo

Help Using EntireColumn
 
Thanks. But it is not working. I tried both of the following versions:
reportWS.Range("D" & reportCurrentRow & "") = c.EntireColumn.Cells(1,
c.Column)
reportWS.Range("D" & reportCurrentRow & "") = c.Cells(1, c.Column)

"Jacob Skaria" wrote:

If I understand you correctly;

Cells(1, ActiveCell.Column)

will give you the value of cell 1 or Row1 of the active cell/column

reportWS.Range("D" & reportCurrentRow) = Cells(1, ActiveCell.Column)


If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

I am trying the assign the value in the first cell in the activecolumn to a
cell in another worksheet. Below is the "EntireColumn" version of the same
formular

reportWS.Range("A" & reportCurrentRow & "") =
c.EntireRow.Cells(reportCurrentRow, 3)

reportWS.Range("D" & reportCurrentRow
&"")=c.EntireColumn.Cells(reportCurrentRow, X)

How would I figure out what X is?


Jacob Skaria

Help Using EntireColumn
 
Try the below..In you code what is c refered to...Activecell ?

Set C = ActiveCell
reportws.Range("D" & reportCurrentRow) = Cells(1, C.Column)

If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

Thanks. But it is not working. I tried both of the following versions:
reportWS.Range("D" & reportCurrentRow & "") = c.EntireColumn.Cells(1,
c.Column)
reportWS.Range("D" & reportCurrentRow & "") = c.Cells(1, c.Column)

"Jacob Skaria" wrote:

If I understand you correctly;

Cells(1, ActiveCell.Column)

will give you the value of cell 1 or Row1 of the active cell/column

reportWS.Range("D" & reportCurrentRow) = Cells(1, ActiveCell.Column)


If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

I am trying the assign the value in the first cell in the activecolumn to a
cell in another worksheet. Below is the "EntireColumn" version of the same
formular

reportWS.Range("A" & reportCurrentRow & "") =
c.EntireRow.Cells(reportCurrentRow, 3)

reportWS.Range("D" & reportCurrentRow
&"")=c.EntireColumn.Cells(reportCurrentRow, X)

How would I figure out what X is?


Ayo

Help Using EntireColumn
 
Thanks Jacob. This worked.
reportWS.Range("D" & reportCurrentRow & "") = c.EntireColumn.Cells(1,
ActiveCell.Column)

"Jacob Skaria" wrote:

Try the below..In you code what is c refered to...Activecell ?

Set C = ActiveCell
reportws.Range("D" & reportCurrentRow) = Cells(1, C.Column)

If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

Thanks. But it is not working. I tried both of the following versions:
reportWS.Range("D" & reportCurrentRow & "") = c.EntireColumn.Cells(1,
c.Column)
reportWS.Range("D" & reportCurrentRow & "") = c.Cells(1, c.Column)

"Jacob Skaria" wrote:

If I understand you correctly;

Cells(1, ActiveCell.Column)

will give you the value of cell 1 or Row1 of the active cell/column

reportWS.Range("D" & reportCurrentRow) = Cells(1, ActiveCell.Column)


If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

I am trying the assign the value in the first cell in the activecolumn to a
cell in another worksheet. Below is the "EntireColumn" version of the same
formular

reportWS.Range("A" & reportCurrentRow & "") =
c.EntireRow.Cells(reportCurrentRow, 3)

reportWS.Range("D" & reportCurrentRow
&"")=c.EntireColumn.Cells(reportCurrentRow, X)

How would I figure out what X is?



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com