How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Joshua C. Your Own Question

Joshua C.
Joshua C., PC Technician
Category: Microsoft Office
Satisfied Customers: 698
Experience:  Microsoft Certified Desktop Support Technician with over 10 years of experience.
18519760
Type Your Microsoft Office Question Here...
Joshua C. is online now
A new question is answered every 9 seconds

HiI need to have a macro on my spreadsheet copied to another

Resolved Question:

Hi
I need to have a macro on my spreadsheet copied to another page and adjusted.
Macro on page 'equity' must hide lines if value in column P is zero. Only the following lines must be included:
P14 to P21 and P24 to P31
Submitted: 1 year ago.
Category: Microsoft Office
Expert:  Joshua C. replied 1 year ago.
Thank you for using JustAnswer.com my name is XXXXX XXXXX I am going to assist you today.

If you upload the excel file to http://wikisend.com and provide the download link that is generated I can copy and edit the macro for you.
Customer: replied 1 year ago.


File ID: 957448

Expert:  Joshua C. replied 1 year ago.

I have reviewed the excel document and the layout of the file is locked (requiring a password).

I am unable to add a new worksheet due to the password XXXXX however I can provide you with the steps to do what you are requesting.

1) Unlock the document to allow editing.
2) Press shift + f11 to add a new worksheet
3) Press alt + f11 to open the VBA editing window
4) Locate the new sheet that you created in the list on the left of the screen (and double click on it)
5) Paste in the following macro

PLEASE NOTE: In the spots that say hide_worksheetname and unhide_worksheetname. Put the name of the worksheet where it says worksheetname.

Sub hide_worksheetname()
On Error Resume Next
Dim iCount As Integer

iCount = 0

While iCount < 2

If Range("P14:P21") = "0" And Range("P24:P31") = "0" Then
Range("P14:P21,P24:P31").Select
Selection.EntireRow.Hidden = True
End If
iCount = iCount + 1

Wend

End Sub

Sub unhide_worksheetname()

Cells.Select
Selection.EntireRow.Hidden = False

End Sub

Joshua C., PC Technician
Category: Computer
Satisfied Customers: 698
Experience: Microsoft Certified Desktop Support Technician with over 10 years of experience.
Joshua C. and 9 other Computer Specialists are ready to help you
Expert:  Joshua C. replied 1 year ago.
I have a also created an example excel worksheet to show the code is working. It can be downloaded at:

http://wikisend.com/download/280622/example.xlsm
Customer: replied 1 year ago.

Excellent-thank you


Just 1 question: how will the macro change if it was applicable to values in more than 1 column (ex column P and column O)?

Expert:  Joshua C. replied 1 year ago.

Sub hide_worksheetname()
On Error Resume Next
Dim iCount As Integer

 

iCount = 0

 

While iCount < 2

 

If Range("P14:P21,o14:o21") = "0" And Range("P24:P31,o24:o31") = "0" Then
Range("P14:P21,P24:P31,o14:o21,o24:o31").Select
Selection.EntireRow.Hidden = True
End If
iCount = iCount + 1

 

Wend

 

End Sub

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
 
 
 

Meet The Experts:

 
 
 
  • jstinehelfer

    Information Systems Manager

    Satisfied Customers:

    36
    A+ Comptia Certified computer repair
< Last | Next >
  • http://ww2.justanswer.com/uploads/JS/jstinehelfer/2012-6-6_215146_Pictureofme1.64x64.png jstinehelfer's Avatar

    jstinehelfer

    Information Systems Manager

    Satisfied Customers:

    36
    A+ Comptia Certified computer repair
  • http://ww2.justanswer.com/uploads/JA/JasonJames122/2011-12-16_135647_jasonjamesheadshotweb.64x64.jpg JasonJames122's Avatar

    JasonJames122

    Computer Enthusiast

    Satisfied Customers:

    0
    I manage all information systems (network of Windows PC's and servers with Microsoft Office products) for a small business
  • http://ww2.justanswer.com/uploads/JE/jessmagz/2012-6-6_18129_jm.64x64.jpg Jess M.'s Avatar

    Jess M.

    Computer Support Specialist

    Satisfied Customers:

    301
    Computer Software Specialist for more than 10 years
  • http://ww2.justanswer.com/uploads/CH/chutz747/2011-11-6_14231_me.64x64.jpg The-PC-Guy's Avatar

    The-PC-Guy

    Computer Manager

    Satisfied Customers:

    274
    20 years experience providing remote computer support
  • http://ww2.justanswer.com/uploads/SP/spherrod/2012-6-6_174244_1000852.64x64.JPG Steve Herrod's Avatar

    Steve Herrod

    Computer Support Specialist

    Satisfied Customers:

    125
    Trained in Microsoft Office from 2000 through to latest version 2010.
  • http://ww2.justanswer.com/uploads/SE/Seashore2011/2011-12-6_33418_111205223015.64x64.jpg Chris L.'s Avatar

    Chris L.

    Support Specialist

    Satisfied Customers:

    124
    Certified Expert with over 10 years experience.
  • http://ww2.justanswer.com/uploads/KR/krkljatorm/2012-6-24_153417_ITMiro.64x64.jpg IT Miro's Avatar

    IT Miro

    Computer Scientist

    Satisfied Customers:

    97
    Bachelor's Degree in Information Technology, Microsoft Certified Professional
 
 
 

Related Microsoft Office Questions

Chat Now With A Microsoft Office Technician
Joshua C.
Joshua C.
Tech Support Specialist
698 Satisfied Customers
Microsoft Certified Desktop Support Technician with over 10 years of experience.