Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default place content of variable in destined cell in previous worksheet

Hi

I get an error message in the line
Cells(x, 3).content = res

I want to place content of res in cellls (x,3) in previous worksheet

How do I do that??

Sub test()

Sheets("makro").Activate

ActiveSheet.Previous.Select

x = 5

Do While Cells(x, 3).Value < ""

res = Application.vlookup(Cells(x, 3),
Worksheets("P&Ltot").Range("A1:G50000"), 7, False)
Cells(x, 3).content = res
x = x + 1

Loop



End Sub
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
Delete previous cell content Craig Excel Worksheet Functions 2 May 14th 10 09:06 PM
List items determined by content of previous cell DS Excel Programming 1 April 4th 06 03:49 PM
Keyboard Macro Just Copies Content of Previous Cell Andy Excel Discussion (Misc queries) 1 October 24th 05 11:54 PM
Hide Cell Content if no data in previous columns Sherry Excel Discussion (Misc queries) 4 February 21st 05 07:27 PM
how to place a variable cell into a range? ozoned Excel Programming 2 August 12th 03 07:58 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"