Monday, February 22, 2016

Troubleshooter of Error: Macro to find a cell in a previous sheet

Macro to find a cell in a previous sheet

Hi,
I would like to have excel macro to go to the previous sheet that I have, find a cell that has the word "Total" and reflect the amount in the cell beside "Total".
Ex: Current sheet is Feb'14 and required cell is G3.

Macro to go to the previous sheet Jan'14, find in column E the word "Total" (maybe E20), then reflect F20 into current sheet G3.
How do I go about it?
Thanks!

Solutions to the Problem Macro to find a cell in a previous sheet

Download Error Fixer for Free Now

Hi Norman,
thank you very much!
But wrt the quote where
With WB
        Set srcSH = Sheets("Jan'14")
        Set destSH = Sheets("Feb'14")
    End With
Problem is, the sheet names are not the same.
For example, the next month, I'll be working on a sheet named "Mar'14" and the macro have to find the cell in "Feb'14".
Thanks!


Hi SnowPrometheus,
Try the following light adaptation:
'==========>>
Option Explicit

'--------->>
Public Sub aTester()
    Dim WB As Workbook
    Dim srcSH As Worksheet
    Dim destSH As Worksheet
    Dim srcRng As Range
    Dim destRng As Range
    Dim SearchRng As Range
    Const sDestAddress As String = "G3"

    Set WB = ThisWorkbook

    With WB
        Set destSH = .ActiveSheet
        Set srcSH = destSH.Previous
    End With

    Set SearchRng = srcSH.Columns("E:E")
    On Error Resume Next
    With SearchRng
        Set srcRng = .Find(What:="Total", _
                           After:=.Cells(1), _
                           Lookat:=xlPart, _
                           LookIn:=xlFormulas, _
                           SearchOrder:=xlByColumns, _
                           SearchDirection:=xlPrevious, _
                           MatchCase:=False).Offset(0, 1)
    End With
    On Error GoTo 0

    If Not srcRng Is Nothing Then
        Set destRng = destSH.Range(sDestAddress)
        destRng.Value = srcRng.Value
    Else
        MsgBox "No cell named Total found!"
    End If
End Sub
'<<==========

Regards,
Norman

Note: It is recommended that you back up your files and folders before attempting this step:

  • Move the mouse cursor over to the upper right side of the screen.
  • A menu will pop up on the left. Click on the "Settings" feature on the menu.
  • On the Settings window, click on the "Change PC settings."
  • Now, left click on the "Update and recovery" feature.
  • For the next step, left click on the "Recovery" feature.
  • There is an option here saying "Refresh your PC without affecting your files." There, left click on the "Get started" button.
  • Now, follow the instructions on the screen to finish the Refresh process.
  • After the Refresh process has finished restart your Windows 8.1 or Windows 8 device.
  • Check again to see if the error Macro to find a cell in a previous sheet has been fixed.

If you do not possess the technical expertise required to accomplish this yourself or do not feel comfortable doing so, download and install a powerful automated tool to get the job done.

Recommended Method to Fix the Problem: Macro to find a cell in a previous sheet:

 

 

How to Fix Macro to find a cell in a previous sheet with SmartPCFixer?

1. Download SmartPCFixer. Install it on your system.

2. After the scan is done, you can see the errors and problems which need to be fixed.

3. When the Fixing part is finished, your computer has been speeded up and the errors have been removed


Related: biosconfigutility exe download Stbwebtv execleanup exe Scanregw exe Download Download Accwiz Exe Xp Windows Error Main Exe Free Fit It Luall exe application Error Odbcad32 exe Missing Vista Hpcaslnotification Exe Error rkill exe imsetup exe ssh exe keyupdatetool exe Talkback Exe msimn exe download Userinit exe Windows Xp Server Execution Error Spuninst Exe Download Windows Live Messenger Msnmsgr Exe wmfdist exe wkufind exe Fpdispxa exe,Can t I change desktop wallpaper in Windows 7 Starter asus motherboard drivers How to synchronise my HTC P3450 Windows mobile 6 with my PC Windows 7 premium family edition asus drivers IE 10 not working on Windows 8 OS after installing other web browsers www asus com Security Update for Windows XP KB975560 and Security Update for Windows XP KB977914 Keep showing as needing install even after updating Why asus com Start menu in Windows 8 asus driver download To remove My Incredistart from the Windows 7 computer asus driver download Windows wont boot I get blank screen with white cursor asus driver (from the blog note)
Read More: Troubleshoot:Can I freely jump back and forth between one and two text columns in a document with different-first-page headers without number-of-columns section breaks mucking things up? Error,[Solved] Windows 7 laptop disables another wireless PC connection,[Solution] Can't turn off the Formula option in Excel 2007,Win 7 Backup and Restore program Content Question [Solved],How to Fix Error - IE8 adds links to Favorites?,E-liquid evaluation on its health indications,4 Ways to Get NCR Veteran Ranger Armor in Fallout New Vegas,after auto install of service pack to windows 7 home premium, system will not go to screensaver or hibernate etc....remains on start screen inedefinatley.,After boot up the desktop seems to freeze up.,How can I change my windows 8 language?

No comments:

Post a Comment