Thank you very much Mr.Paul. I have tried it. Succesfull. Can I ask again? Divided by small number square 0.00002, how can i get the value, because the VBA assume it zero. Actually i don't want to assume it zero value.
On Fri, Sep 19, 2014 at 9:31 AM, Paul Schreiner <schreiner_p...@att.net> wrote: > What is the actual name of your worksheets? > Is one actually called "Sheet1" or have you renamed it something else? > > For instance, if the first sheet in your workbook is called "Data", > in the VBA explorer window, it will be called: > Sheet1 (Data) > > If you want to refer to the value of Cells(32 + j, 3 + i) in the Data > sheet, > you would either use: > Worksheets("Data").Cells(32 + j, 3 + i).Value > or > Sheet1.Cells(32 + j, 3 + i).Value > > > *Paul* > ----------------------------------------- > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > ----------------------------------------- > > *From:* josua sitinjak <josuasitinja...@gmail.com> > *To:* excel-macros@googlegroups.com > *Sent:* Thursday, September 18, 2014 9:41 PM > *Subject:* $$Excel-Macros$$ Loop in cell in different sheet in a workbook > > 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 a topic in the > Google Groups "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/excel-macros/iM8xfH_ghWY/unsubscribe. > To unsubscribe from this group and all its topics, 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.