Copy data from another column (Only for Visible cells)

Aswinraj

Board Regular
Joined
Dec 10, 2015
Messages
61
Hello Guys,

I Need to Map the data from one column to another column. Example: Consider there are two columns A and B where i need to Map the data present in B to A.
I took the ColumnName (Column B) as ColLtr_Customer and Current row in Column A as currrow and entered the formula as show below but i am getting the result as =@'B576' and correct result should be =B576

Note: I will copy the formula till last available column only for visible cells ( this formula applied only to visible cells)


VBA Code:
ActiveCell.FormulaR1C1 = "=" & ColLtr_Customer & currrow
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
12,920
Office Version
365, 2010
Platform
Windows, Mobile
I assume that you are using 365...
The @ symbol shouldn't stop your formula running is it giving an incorrect result?

For information on the @ symbol (Implicit Intersection Operator) see the link below.
 

Aswinraj

Board Regular
Joined
Dec 10, 2015
Messages
61
@MARK858 : Yes i am using office 365. And i got the correct result by changing FormulaR1C1 to Value.

Thanks for your time.
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
12,920
Office Version
365, 2010
Platform
Windows, Mobile
That was stupid of me not spotting that you were using .FormulaR1C1 for a formula in A1 style :rolleyes:
Happy that you have it sorted (btw you can use .Formula rather than .Value as well).
 

Watch MrExcel Video

Forum statistics

Threads
1,102,907
Messages
5,489,650
Members
407,703
Latest member
Chibuzo

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top