+ Reply to Thread
Results 1 to 11 of 11

i want to select all cells with one inputbox

Hybrid View

HaroonSid i want to select all cells... 05-06-2014, 03:31 AM
:) Sixthsense :) Re: i want to select all... 05-06-2014, 03:50 AM
HaroonSid Re: i want to select all... 05-06-2014, 06:56 AM
:) Sixthsense :) Re: i want to select all... 05-06-2014, 07:16 AM
HaroonSid Re: i want to select all... 05-06-2014, 08:41 AM
:) Sixthsense :) Re: i want to select all... 05-06-2014, 08:47 AM
HaroonSid Re: i want to select all... 05-06-2014, 08:51 AM
:) Sixthsense :) Re: i want to select all... 05-06-2014, 09:01 AM
HaroonSid Re: i want to select all... 05-06-2014, 09:07 AM
:) Sixthsense :) Re: i want to select all... 05-06-2014, 09:26 AM
HaroonSid Re: i want to select all... 05-06-2014, 11:06 AM
  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,095

    i want to select all cells with one inputbox

    hello
    i m using below code to edit data one by one using inputbox
    e.g
    i have data in c10:c20 and i play code then there is popup inputbox 10 time to edit every cells data one by one
    or
    i have data in c10:c30 then popup inputbox 20 time to edit every cells data one by one

    i want click only one time the inputbox and edit cells one by one (don't popup inputbox 10 times or 20 times)

    thanx

    Sub Haroon2015_RangeEditing()
    Sheets("ENTRY").Select
    If WorksheetFunction.count(Range("C10:C300")) = 0 Then Exit Sub
    Range("C10:C300").SpecialCells(xlCellTypeConstants).Select
    Dim rngCell As Range
    Dim varAns
    'For Each rngCell In Range("C10:C25")
    For Each rngCell In Selection
      varAns = InputBox(prompt:="Edit cell if wanted", Title:="Edit cell " & rngCell.Address(0, 0), Default:=rngCell.Value)
      If Not varAns = "" Then rngCell.Value = varAns
    Next rngCell
    End Sub

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: i want to select all cells with one inputbox

    Whether the input text will be same for all those cells?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,095

    Re: i want to select all cells with one inputbox

    Hello 2*S
    e.g
    i have data in c10:c14...
    AHSAAN G
    ALI G
    AYAZ
    SABIYA
    AJAJ
    now i play code, then
    inputbox pop up with c10 = AHSAAN = I click ok then
    inputbox pop up again with c11 = ALI G = I Click ok then
    inputbox pop up again with c12 = AYAZ = I Click ok then
    inputbox pop up again with c13 = SABIYA = I Click ok then
    inputbox pop up again with c14 = AJAJ = I Click ok then

    NOW I WANT THIS PROCESS WITH ONE CLICK AND EDIT ALL CELLS ONE BY ONE

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: i want to select all cells with one inputbox

    Try this...

    Sub Haroon2015_RangeEditing()
    Dim rMyRng As Range, r As Range, vInput As Variant
    
    Sheets("ENTRY").Select
    
    Set rMyRng = Range("C10:C300")
    
    If WorksheetFunction.Count(rMyRng) = 0 Then Exit Sub
    
    Set rMyRng = rMyRng.SpecialCells(xlCellTypeConstants)
    
    For Each r In rMyRng
        r.Select
        vInput = InputBox(prompt:="Edit cell if wanted", Title:="Edit cell " & r.Address(0, 0), Default:=r.Value)
        If r.Value <> vInput Then r.Value = vInput
    Next r
    
    End Sub

  5. #5
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,095

    Re: i want to select all cells with one inputbox

    Hello 2*S
    whats ur code does?
    because nothing is happening

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: i want to select all cells with one inputbox

    Quote Originally Posted by haroon2015 View Post
    whats ur code does?
    because nothing is happening
    The same thing what you are doing in Post #1 lol

  7. #7
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,095

    Re: i want to select all cells with one inputbox

    hehehe

    but problem is
    code is not working as i want

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: i want to select all cells with one inputbox

    Check the attached file
    Attached Files Attached Files

  9. #9
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,095

    Re: i want to select all cells with one inputbox

    2*S
    same thing working my code

    ok now u do i click only one time on inputbox then otherbox by default take yes

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: i want to select all cells with one inputbox

    I don't know how you will expect the input box to work without hitting Ok button for each cell value change

  11. #11
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,095

    Re: i want to select all cells with one inputbox

    ok 2*S
    if this is not possible to work without hitting Ok button then plz

    inputbox select only without duplicates, i mean
    e.g
    i have data in c10:c14...
    AHSAAN G
    ALI G
    AHSAAN G
    SABIYA
    AHSAAN G
    now i play code, then inputbox popup for onle first cell C10, then C11, then C13(skip the duplicates c12,c14
    inputbox pop up with c10 = AHSAAN = I click ok then
    inputbox pop up again with c11 = ALI G = I Click ok then
    inputbox pop up again with c13 = SABIYA = I Click ok then

    thanx

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] inputbox to select cells instead of typing cell locations
    By miyachow in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2013, 09:20 AM
  2. Select range with InputBox. Is it possible?
    By Isabel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-13-2013, 06:36 AM
  3. [SOLVED] Select range via Inputbox
    By nakul2617 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-21-2013, 07:46 AM
  4. Select Value from Checkbox in an InputBox
    By farmassist in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-30-2010, 06:19 PM
  5. Inputbox - Select ranges
    By cottage6 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2005, 03:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1