Summing LOOKUP values

M

mpjohnston

I am pulling info from one sheet and putting it in another, via a macro
I am using the lookup funtion to get three values of data from separat
worksheets. I then put those three values on a new worksheet and woul
like to sum them.

Unfortunitely, the values do not sum. A way that works would be to do
paste-special values only, but I do not know how to do that via
marco.

Any suggestions?
Thanks,
Mik
 
I

icestationzbra

i got the following after recording a macro (the first place to look fo
solutions):

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks :=False, Transpose:=False

alternately, here is a macro provided by frank kabel in another post
for a similar requirement:

option explicit
sub test()
dim rng as range
set rng=selection
with rng
.value=.value
end with
end sub

select the range where in you want the values, then run this macro
 
M

mpjohnston

Not sure if this will help much. Below is the lookup

For h = 1 To 27
For i = 1 To 11
Range("" & cellLoc(i) & Count & "").Select
ActiveCell.FormulaR1C1 = _
"=LOOKUP(2,1/(qperioddistribution!R[-" & Count - 1 & "]C[-
& i & "]:R[" & RCount2 & "]C[-" & i & "]=""" & txtSearch(h)
"""),qperioddistribution!R[-" & Count - 1 & "]C[2]:R[" & RCount2
"]C[2])"
Next i
Count = Count + 1
RCount = RCount - 1
Next h


The summation statement would then be =A1+A2+A
 
Top