Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Loops in a range for a more than one ocurrence of samevalue

This is simple macro
I want to create a loop.Write now if I transpose the data it's range
related. I want to make it independent of cell.


Sheets("mntn"). Select
'Range("F14:F25").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("mon").Select
Range("Cn").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False

Any help would be appreciated
--
Kittie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Loops in a range for a more than one ocurrence of samevalue

When you say "independent of cell". Do you mean the source cell or the
destination cell? How do you want it to be independent? By asking for the
range, selecting it, or what.
BTW. You can remove selections for better and faster code.

Sheets("mntn").range("F14:F25").Copy
Sheets("mon").Range("Cn").PasteSpecial Paste:=xlPasteAll, _
Operation:=xlNone,SkipBlanks:=False, _
Transpose:=True Application.CutCopyMode = False



--
Don Guillett
SalesAid Software

"Lolly" wrote in message
...
This is simple macro
I want to create a loop.Write now if I transpose the data it's range
related. I want to make it independent of cell.


Sheets("mntn"). Select
'Range("F14:F25").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("mon").Select
Range("Cn").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False

Any help would be appreciated
--
Kittie



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Loops in a range for a more than one ocurrence of samevalue

or even simpler:

Sheets("mntn").range("F14:F25").Copy _
Destination:=Sheets("mon").Range("Cn")

--
Regards,
Tom Ogilvy


"Don Guillett" wrote in message
...
When you say "independent of cell". Do you mean the source cell or the
destination cell? How do you want it to be independent? By asking for the
range, selecting it, or what.
BTW. You can remove selections for better and faster code.

Sheets("mntn").range("F14:F25").Copy
Sheets("mon").Range("Cn").PasteSpecial Paste:=xlPasteAll, _
Operation:=xlNone,SkipBlanks:=False, _
Transpose:=True Application.CutCopyMode = False



--
Don Guillett
SalesAid Software

"Lolly" wrote in message
...
This is simple macro
I want to create a loop.Write now if I transpose the data it's range
related. I want to make it independent of cell.


Sheets("mntn"). Select
'Range("F14:F25").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("mon").Select
Range("Cn").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False

Any help would be appreciated
--
Kittie





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Loops in a range for a more than one ocurrence of samevalue

No, I missed the transpose:=true, I saw it as false. Must have read too
fast.

--
Regards,
Tom Ogilvy

"Don Guillett" wrote in message
...
Tom,
Will that do the transpose?

--
Don Guillett
SalesAid Software

"Tom Ogilvy" wrote in message
...
or even simpler:

Sheets("mntn").range("F14:F25").Copy _
Destination:=Sheets("mon").Range("Cn")

--
Regards,
Tom Ogilvy


"Don Guillett" wrote in message
...
When you say "independent of cell". Do you mean the source cell or the
destination cell? How do you want it to be independent? By asking for

the
range, selecting it, or what.
BTW. You can remove selections for better and faster code.

Sheets("mntn").range("F14:F25").Copy
Sheets("mon").Range("Cn").PasteSpecial Paste:=xlPasteAll, _
Operation:=xlNone,SkipBlanks:=False, _
Transpose:=True Application.CutCopyMode = False



--
Don Guillett
SalesAid Software

"Lolly" wrote in message
...
This is simple macro
I want to create a loop.Write now if I transpose the data it's range
related. I want to make it independent of cell.


Sheets("mntn"). Select
'Range("F14:F25").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("mon").Select
Range("Cn").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False

Any help would be appreciated
--
Kittie










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Loops in a range for a more than one ocurrence of samevalue

Hi
Donn

Thanx forthe reply. I will be more descriptive with what I wanted to do

My data is as follows in excel sheet

measure values

99 33
99 12
99
99 and so on
100
100
100

So i wanted to make a loop inseated of copying and pasting
if you could help me on that it will be great full to you
"Don Guillett" wrote:

When you say "independent of cell". Do you mean the source cell or the
destination cell? How do you want it to be independent? By asking for the
range, selecting it, or what.
BTW. You can remove selections for better and faster code.

Sheets("mntn").range("F14:F25").Copy
Sheets("mon").Range("Cn").PasteSpecial Paste:=xlPasteAll, _
Operation:=xlNone,SkipBlanks:=False, _
Transpose:=True Application.CutCopyMode = False



--
Don Guillett
SalesAid Software

"Lolly" wrote in message
...
This is simple macro
I want to create a loop.Write now if I transpose the data it's range
related. I want to make it independent of cell.


Sheets("mntn"). Select
'Range("F14:F25").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("mon").Select
Range("Cn").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False

Any help would be appreciated
--
Kittie




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
Do loops grandfilth Excel Discussion (Misc queries) 1 November 10th 05 12:00 AM
Do Loops Sue[_5_] Excel Programming 1 May 20th 04 07:51 PM
RANGE & NESTED LOOPS jay dean Excel Programming 1 January 29th 04 11:43 PM
Non Contiguous range and loops David Excel Programming 3 November 3rd 03 01:40 PM
Loops Tom Ogilvy Excel Programming 0 July 18th 03 05:20 PM


All times are GMT +1. The time now is 03:41 AM.

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"