Hi

Fill data in relevant cells of sheet1 to get values in sheet 2.

Starring cell is C32 in Sheet 1 & after that looping is done offsetting 10
rows & 10 column.

PFA, macro is working correctly

Cheers!!

+++++
*I did not do this for you. God is here working through me for you.*

On Fri, Sep 19, 2014 at 7:11 AM, josua sitinjak <josuasitinja...@gmail.com>
wrote:

> Good morning MS EXCEL AND VBA MACROS member.
> I'm newbie in macros.
> I would like to ask something.
>
> Please help me,
>
> I want to loop in a value in different sheet in a workbook at macro excel.
> ex :
> I want to compute x value in sheet 2, but to compute the x value, i need y
> value in sheet 1. I have tried some method, but the macros said, "subs out
> of range".
> Anyone can help me?
> Every x value always related to every y value. I mean x1 to y1, x2 to y2,
> etc...
>
> This is the code i type in sheet 2.
>
>
> Sub Hitung_Sound_Pressure_Level ()
>
> Dim i, j, A, c, Pe0 As Double
>
> A = 0.0705
> Pe0 = 0.00002
> c = 2 ^ 0.5
>
> For j = 0 To 10
>     For i = 0 To 10
>         Cells(32 + j, 3 + i).Value = 10 * Log((A /
> ((Worksheets("Sheet1").Cells(32 + j, 3 + i).Value) * c)) ^ 2 / (Pe0 ^ 2))
>           Next i
>     Next j
> End Sub
>
>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Attachment: loop in cell.xlsb
Description: application/vnd.ms-excel.sheet.binary.macroenabled.12

Reply via email to