Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy a single cell to a cell in a range


I'm an old COBOL programmer trying to port an ancient Quattro (DOS
application to Excel, converting the Quattro macro to Excel VBA. Ther
are only a few kinds of operations I need to reproduce in VBA. Th
first one is this:

I want to copy the value in a single cell to a particular cell in
named range.
The single cell is named "In_pop" in a sheet named Input.
The range is named "C_pop" and is in cells A4:A1151 in a sheet name
Target.
The position of the target cell in C_pop is in a cell named ThisWeek i
Target

If this were COBOL, the relevant code would be:
01 In_pop pic 9(5).
01 C_pop_array.
05 C_pop pic 9(5) occurs 1148.
01 ThisWeek pic 9(5) value 862.
. . . . .
Move In_pop to C_pop (ThisWeek)

I would be grately deepful for any assistance.

Tim Car

--
Carrfamil
-----------------------------------------------------------------------
Carrfamily's Profile: http://www.excelforum.com/member.php...fo&userid=2508
View this thread: http://www.excelforum.com/showthread.php?threadid=38599

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Copy a single cell to a cell in a range

Try something like

Sub AAA()
Range("In_Pop").Copy destination:=Range("ThisWeek")
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"Carrfamily"
wrote
in message
...

I'm an old COBOL programmer trying to port an ancient Quattro
(DOS)
application to Excel, converting the Quattro macro to Excel
VBA. There
are only a few kinds of operations I need to reproduce in VBA.
The
first one is this:

I want to copy the value in a single cell to a particular cell
in a
named range.
The single cell is named "In_pop" in a sheet named Input.
The range is named "C_pop" and is in cells A4:A1151 in a sheet
named
Target.
The position of the target cell in C_pop is in a cell named
ThisWeek in
Target

If this were COBOL, the relevant code would be:
01 In_pop pic 9(5).
01 C_pop_array.
05 C_pop pic 9(5) occurs 1148.
01 ThisWeek pic 9(5) value 862.
. . . .
Move In_pop to C_pop (ThisWeek)

I would be grately deepful for any assistance.

Tim Carr


--
Carrfamily
------------------------------------------------------------------------
Carrfamily's Profile:
http://www.excelforum.com/member.php...o&userid=25088
View this thread:
http://www.excelforum.com/showthread...hreadid=385994



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
Cannot copy merged cell to a single cell Kasper Excel Discussion (Misc queries) 13 March 2nd 09 01:13 PM
How to copy single cell into cell that is merged from two cells? Rod Excel Discussion (Misc queries) 3 January 22nd 06 09:24 PM
How to I copy text from a range of cells to another single cell? WRT Excel Discussion (Misc queries) 2 December 18th 05 06:17 AM
Range.Find returns cell outside of range when range set to single cell Frank Jones Excel Programming 12 June 10th 04 04:22 AM
How To Copy Sum of Cell Values vs A Single Cell Value Mike Taylor Excel Programming 3 April 24th 04 02:17 AM


All times are GMT +1. The time now is 11:00 PM.

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"