Loops in a range for a more than one ocurrence of samevalue

L

Lolly

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
 
D

Don Guillett

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
 
T

Tom Ogilvy

or even simpler:

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

Tom Ogilvy

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

--
Regards,
Tom Ogilvy

Don Guillett said:
Tom,
Will that do the transpose?
 
L

Lolly

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
 
Top