#ref!

jarhead58

Active Member
Joined
Sep 21, 2017
Messages
367
Office Version
  1. 2021
Platform
  1. Windows
After deleting a record, my coditional formating goes from this "=MATCH(M12,($B$2:$F$2),0) to this "=MATCH(M12,(#REF!),0)" even though the records have shifted up into the pertinent cells!
 
That was it!!! Thanks alot, really appreciate all of the help!!
 
Last edited by a moderator:
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Well, thought I was good to go!! I apologize for being a bother, I'm such a newbie at this lol! How can I delete the record that appears in my form when I use the Find Next button? Right now it's deleting A2:I2 which is fine for mistakes. I know I need to remove the A2:I2 reference in the sub! Working on this, I have duplicated records and I just wanted to go backwards and delete the repeats! TIA
 
Upvote 0
I haven't looked at your file as downloading workbooks is frowned upon at work, so I have no idea what your code looks like I'm afraid. I'll look at it tomorrow if nobody else has jumped in in the meantime.
 
Upvote 0
Here is the code for the delete.

Code:
[COLOR=#ff0000]Private Sub Delete_Click()[/COLOR]    
    Dim ws As Worksheet
    Dim rng As Range
    
    Set ws = ActiveSheet
    Set rng = ws.Range("a2:I2")
    rng.Delete Shift:=xlUp
    ans = MsgBox("Do you want to continue?", vbYesNo)
If ans = vbYes Then
    Call Update
Else
    Unload EntryForm
End If

[COLOR=#ff0000]Private Sub Find_Next_Click()[/COLOR]
    Call Update
End Sub


[COLOR=#ff0000]Private Sub Previous_Click()[/COLOR]
 lngR = lngR - 2
    Call Update
End Sub


[COLOR=#ff0000]Sub Update()[/COLOR]


If lngR = 0 Then


        lngR = 2


    Else


        lngR = lngR + 1


End If


 DateBox.Value = Sheet1.Range("A" & lngR).Text
    Ball1.Value = Sheet1.Range("B" & lngR).Text
    Ball2.Value = Sheet1.Range("C" & lngR).Text
    Ball3.Value = Sheet1.Range("D" & lngR).Text
    Ball4.Value = Sheet1.Range("E" & lngR).Text
    Ball5.Value = Sheet1.Range("F" & lngR).Text
    Power.Value = Sheet1.Range("G" & lngR).Text
    PowerPlay.Value = Sheet1.Range("H" & lngR).Text
    Winnings.Value = Sheet1.Range("I" & lngR).Text
    
        
End Sub
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,346
Members
452,638
Latest member
Oluwabukunmi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top